Formatting reference
Everything below is standard Markdown unless noted. Open this file
(src/content/posts/formatting-reference.mdx) side-by-side with the rendered
page to see how each piece maps.
Headings & text
Use ## for section headings and ### for subsections (the title above is the
only #/h1). Inline you get bold, italic, inline code, and
links. Separate paragraphs with a blank line.
Blockquotes use a leading
>. Good for pull-quotes or noting an assumption.
Lists
- Bullet lists use
- - Nest by indenting two spaces
- like this
- Numbered lists use
1.2.… - …and render in order
Code
Fenced blocks get syntax highlighting (Shiki, light/dark aware). Put the language after the opening fence:
def cooccurrence(matrix):
# keyword co-occurrence = D^T D
return matrix.T @ matrix
Math
Inline math with single dollars: the leakage is a vector . Display math with double dollars on their own lines:
Tables
| Field | Required | Notes |
|---|---|---|
title | yes | Post heading + tab title |
date | yes | YYYY-MM-DD, sorts the list |
description | no | Used for SEO / link previews |
draft | no | true hides it from /writing |
Diagrams
Mermaid diagrams need the component imported at the top of the file
(import Mermaid from "../../components/Mermaid.astro"; — see sirap.mdx),
then:
flowchart LR A[Write .mdx in src/content/posts/] --> B[Push to main] B --> C[GitHub Actions builds] C --> D[Live on testoupr.github.io]
Images
Put files under public/ and reference them from the site root. For example an
image at public/trips/headshot.jpeg is written as:

To publish a real post: copy this file to src/content/posts/my-post.md
(plain Markdown is fine — drop the .mdx/<Mermaid> bits if you don’t need
diagrams), set draft: false, edit the frontmatter, write, and push to main.
It appears at /writing/my-post.