← all posts

Markdown style guide

1 min read#meta#writing

A reference post that shows every element a post can use. Keep it as a cheat sheet, or mark it draft: true to hide it.

Text

Paragraphs are plain text. You get bold, italic, inline code, and links. Keep lines short and say one thing per paragraph.

Blockquotes are for quoting someone else, or for the one line you want a reader to remember.

Lists

  • Unordered lists for things without an order
  • Like features, or ideas
    • Nested when you need it
  1. Ordered lists for steps
  2. Run npm run dev
  3. Open http://localhost:4321

Code

// Syntax highlighting follows the light/dark toggle.
export function greet(name: string): string {
  return `Hello, ${name}!`;
}
npm run build && npm run preview

Tables

Command What it does
npm run dev Local dev server with hot reload
npm run build Build the static site to dist/
npm run preview Serve the built site locally

Callouts (MDX only)

Import the component at the top of an .mdx file, then use it anywhere:


That’s everything. Horizontal rules, like the one above, split a post into parts.