
This guide collects the Markdown and MDX syntax currently supported by this blog. Use .md for regular posts. Use .mdx when you need imports, JSX, or Astro components inside the article.
Frontmatter
Every post starts with YAML frontmatter. The content collection reads these fields to render the title, description, date, category, tags, cover image, and language route.
title, description, and date are required. Put English posts in src/content/blog/en/; lang: en is optional but useful for clarity.
Headings And TOC
Post pages automatically build the table of contents from h2 through h6, so body content usually starts at ##.
Heading 3 Example
Heading 4 Example
Heading 5 Example
Heading 6 Example
Paragraphs, Breaks, And Rules
Separate paragraphs with a blank line.
To force a line break inside the same paragraph, add two spaces at the end of the line or use <br>.
Inline Formatting
Common inline formatting works as expected:
Rendered output:
bold, italic, bold italic, strikethrough, inline code
Autolinks also work: https://github.github.com/gfm
Inline code can also opt into Shiki syntax highlighting:
Rendered output: console.log("Hello World")
Lists
Rendered output:
- Unordered item
- Second item
- Nested item
- Another nested item
- Ordered item
- Second step
- Third step
- Done
- Not done
- Important
- Question
- Added
- Highlight
- Info
- Cancelled
Supported checkbox markers:
| Marker | Meaning | Icon |
|---|---|---|
[ ] | To-do | Default empty box |
[x] / [X] | Done | Default check |
[/] | Incomplete | bi:circle-half |
[-] | Canceled | bi:dash |
[>] | Forwarded | tabler:arrow-big-right-filled |
[<] | Scheduling | bi:calendar-plus-fill |
[?] | Question | bi:question-lg |
[!] | Important | bi:exclamation-lg |
[*] | Star | bi:star-fill |
["] / [“] / [”] | Quote | bi:quote |
[l] | Location | tabler:map-pin-filled |
[b] | Bookmark | bi:bookmark-fill |
[i] | Information | bi:info-lg |
[S] | Dollar | bi:currency-dollar |
[I] | Idea | tabler:bulb-filled |
[p] / [P] | Pros | tabler:thumb-up-filled |
[c] / [C] | Cons | tabler:thumb-down-filled |
[w] / [W] | Win | tabler:trophy-filled |
[u] | Up | tabler:trending-up |
[d] | Down | tabler:trending-down |
[+] | Add | bi:plus-lg |
[B] | Bug | bi:bug-fill |
[a] | Alarm | bi:alarm-fill |
[n] / [N] | Note | bi:file-earmark-text-fill |
[R] | Review | tabler:letter-r |
[L] | Love | tabler:heart-filled |
Rendered marker preview:
- To-do
- Done
- Done uppercase
- Incomplete
- Canceled
- Forwarded
- Scheduling
- Question
- Important
- Star
- Quote
- Smart quote
- Location
- Bookmark
- Information
- Dollar
- Idea
- Pros
- Pros uppercase
- Cons
- Cons uppercase
- Win
- Win uppercase
- Up
- Down
- Add
- Bug
- Alarm
- Note
- Note uppercase
- Review
- Love
Blockquotes
The best time to write a post is right after solving the problem.
The second best time is before you forget why it mattered.
Blockquotes can include bold text, italic text, links, footnotes, and inline code.
Images
Images can reference files from src/assets with relative paths, or they can use external URLs.

Tables
| Syntax | Purpose | Example |
|---|---|---|
_text_ | Italic | text |
**text** | Bold | text |
`code` | Inline code | code |
Footnotes
Here is a footnote reference.1 Footnotes render in the bottom footnote section on compact layouts and as left-side sidenotes on roomy layouts.
HTML Elements
Markdown can include small pieces of HTML. This blog already styles these common elements:
H2O
Xn + Yn = Zn
Press Ctrl + K
Use highlight for emphasis.
Code Blocks
Code blocks use Shiki highlighting and include a copy button automatically. Common supported languages include astro, bash, css, html, js, jsx, json, md, mdx, npm, sh, ts, tsx, vue, and yaml.
Code Block Titles
Line Numbers
Highlight, Diff, And Focus
Use Shiki transformer comments to style specific lines or words.
Code Block Tabs
Adjacent code blocks with tab="..." are automatically grouped into tabs.
Steps
Use [step] or numeric prefixes on consecutive headings to render them as numbered guide steps. The marker is removed from the visible heading, and the same number is shown in the table of contents.
Using [step]
Heading 2
This is the main note for the first step. Use it for prerequisites, goals, or context.
Sub Heading 1
Nested steps can include body copy for smaller actions.
Sub Heading 2
The second nested step stays at the same numbered level as the previous one.
Heading 3
Returning to a level-two heading continues the outer step sequence.
Using Numbers
Heading 2
Numeric prefixes are useful when migrating existing docs. The rendered heading removes the number.
Sub Heading 1
Nested numeric prefixes are also regenerated by the renderer.
Sub Heading 2
You can focus on the document structure instead of maintaining the final marker style.
Heading 3
The outer sequence continues as the second step.
Math
This blog enables remark-math and rehype-katex, so both inline math and block math are available.
Inline math:
Callout
Both .md and .mdx files can use <Callout>, and they can also use Docusaurus / Fumadocs Remark Admonition style ::: syntax. Supported names are note, tip, info, warn, warning, caution, danger, error, success, and idea.
JSX Syntax
<Callout> is useful in MDX. note / tip / info render as info callouts, warn / warning / caution render as warning callouts, and danger / error render as error callouts.
Admonition Syntax
Admonition syntax comes from Docusaurus, and Fumadocs remarkDirectiveAdmonition supports it for migrations. The title is optional; when present, put it in square brackets. Inline Markdown is allowed in the title.
Cards
Both .md and .mdx files can use <Cards> and <Card>. href turns a card into a link, external links get safe attributes automatically, and icon can use a Lucide icon name.
Astro
A content-first static site framework
Great for blogs, docs, and portfolio sites.
Local component
A card without a link
Cards can also group related content.
MDX Components
.mdx is a superset of Markdown. It can import Astro components and render them inline. Components render as static HTML unless the component itself opts into client-side JavaScript.
You can also write code block tabs with components when you need more control over tab attributes.
Writing Notes
- Start body content at
##so the page title comes only from frontmatter. - Keep paragraphs short; the table of contents becomes easier to scan.
- Add a language to every code block when possible, and use
title="file.ts"when a filename matters. - Use
<Callout>for important notes and<Cards>for grouped links. - Use
[step]headings for procedural guides where the order matters. - Use
.mdfor plain writing and.mdxwhen you need imports or JSX. - When adding, changing, or removing Markdown / MDX format support, update
CLAUDE.md,AGENTS.md, this English guide, and the Chinese guide together.
Footnotes
-
Footnotes render in the bottom footnote section on compact layouts and as left-side sidenotes on roomy layouts. ↩