← Writing

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

  1. Numbered lists use 1. 2. …
  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 a∈{0,1}na \in \{0,1\}^n. Display math with double dollars on their own lines:

Co(D)=D⊤D,D∈{0,1}n×m.\mathrm{Co}(D) = D^\top D, \qquad D \in \{0,1\}^{n \times m}.

Tables

FieldRequiredNotes
titleyesPost heading + tab title
dateyesYYYY-MM-DD, sorts the list
descriptionnoUsed for SEO / link previews
draftnotrue 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:

![Alt text describing the image](/trips/headshot.jpeg)

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.