Skip to content
Go back

Blog authoring tutorial (math, code, media, interactive HTML, and marimo)

Edit page

This tutorial is a one-stop reference for creating rich blog posts in this repository.

Table of contents

Open Table of contents

1) Markdown basics

Use normal Markdown headings, emphasis, lists, links, and quotes.

Tip: Keep each section focused and use short paragraphs for readability.

Useful links:

2) Write math with KaTeX

Inline math works directly in Markdown, for example E=mc2E = mc^2 and σ2=1ni(xiμ)2\sigma^2 = \frac{1}{n}\sum_i(x_i-\mu)^2.

Display math works too:

E=ρε0\nabla \cdot \vec{E} = \frac{\rho}{\varepsilon_0} 01x2dx=13\int_0^1 x^2 \, dx = \frac{1}{3}

3) Code blocks

Use fenced code blocks:

type Post = {
  title: string;
  tags: string[];
};

const post: Post = { title: "Rich markdown", tags: ["docs", "math"] };
console.log(post);

Inline code also works, like npm run dev.

4) Images

Add images with Markdown:

Site OG image example

“Simplicity is prerequisite for reliability.” — Edsger W. Dijkstra

You can add references with footnotes enabled by GFM.1

Linking to files in this repository

6) Standalone interactive HTML + JavaScript

Put standalone files in public/interactive/*.html. They are served directly.

Example file in this repo:

Direct link:

Embed it inside a blog post:

7) Convert marimo notebooks to blog posts

  1. Export a notebook to Markdown:

    marimo export md path/to/notebook.py -o src/data/blog/notebook-post.md
  2. Ensure the exported file starts with required frontmatter keys:

    ---
    title: "My notebook post"
    description: "Summary of the notebook"
    pubDatetime: 2026-05-11T00:00:00Z
    author: "Ramneet Singh"
    tags:
      - marimo
    draft: false
    ---
  3. Optionally edit the Markdown for structure and readability, then run:

    npm run dev

That is all you need to publish rich technical blogs in this project.

Footnotes

  1. KaTeX project site: https://katex.org/.


Edit page
Share this post on: