Markdown cheatsheet

A reference of every Markdown feature supported out of the box.

This post demonstrates every Markdown feature wired up in the template, so you can copy-paste into your own posts.

Headings

# H1 — only one per page (the post title)
## H2
### H3
#### H4

Inline formatting

You can write bold, italic, strikethrough, and inline code. You can also link to external sites or to other posts.

Lists

Unordered:

  • First item
  • Second item
    • Nested item
    • Another nested item
  • Third item

Ordered:

  1. Open your editor
  2. Create a new .md file
  3. Start writing

Blockquote

“Premature optimization is the root of all evil.” — Donald Knuth

Code blocks

Syntax highlighting is provided by Shiki. Specify a language for color:

interface Post {
  title: string;
  date: Date;
}

function publish(post: Post): void {
  console.log(`Publishing: ${post.title}`);
}
# Build and deploy in one command
npm run deploy

Tables

FeatureBuilt-inNotes
Markdown.md files in src/pages
MDX🧩Add via npx astro add mdx
RSSGenerated at /rss.xml
SitemapGenerated at /sitemap-index.xml

Horizontal rule


Images

See Adding images to posts for the full walkthrough — but the short version is:

![Alt text](/images/posts/your-image.png)

Footnotes

GitHub-flavored Markdown footnotes also work1.

Footnotes

  1. Like this — they render at the bottom of the article.