The Markdown Guide I Wish I Had
2 min read
Markdown is the lingua franca of static sites. This post doubles as a reference for everything the renderer here supports.
Emphasis
You can write italic text, bold text, or both at once. For code
spans, use backticks like const answer = 42.
Lists
Unordered lists keep things scannable:
- First item
- Second item
- Nested item
- Another nested item
- Third item
Ordered lists work the same way:
- Install dependencies
- Run the dev server
- Ship the build
Links and images
A link to the Astro docs renders inline. Images are similar but start with a bang:
Blockquotes
The best code is the code you never had to write. — Someone, probably
Tables
| Feature | Supported | Notes |
|---|---|---|
| Headings | Yes | Levels 1 through 6 |
| Tables | Yes | GitHub-flavoured Markdown |
| Alerts | Yes | See the GitHub alerts post |
| Math | Yes | Powered by KaTeX |
Code
Inline code uses single backticks, while fenced blocks get syntax highlighting:
function greet(name) {
return `Hello, ${name}!`;
}
That covers the essentials. Everything else is a variation on these building blocks.
Related posts
Subscribe to the Newsletter
Get the latest posts delivered right to your inbox.
Comments