MkDocs Markdown Quick Reference Card
Commands
| Command | Purpose |
|---|---|
mkdocs serve |
Live preview at localhost:8000 |
mkdocs build |
Generate static site |
mkdocs new [name] |
Create new project |
mkdocs build --clean |
Clean build |
Text Formatting
Headers
Lists
Unordered:
Ordered:
Lazy numbering: Use 1. for all items—Markdown auto-numbers.
Links & Images
[Link text](https://example.com)
[Internal link](../week02/index.md)
[Section link](#header-name)
[Download](files/myfile.pdf)

{ width="300" }
Memory trick: Links use [text](url) — Images add ! in front.
Tables
Colons point toward alignment direction.
Code Blocks
Languages: python, bash, html, css, javascript, c, yaml, json
Blockquotes
Horizontal Rule
Material Theme Admonitions
Types: note, tip, warning, danger, info, success, question, example
Collapsible:
Task Lists
Memory Tricks
| Element | Remember |
|---|---|
**bold** |
Double stars = double strong |
*italic* |
Single star = subtle |
[text](url) |
Brackets hold words, parens hold path |
 |
Excited ! = visual content |
# headers |
More # = smaller (like weight class) |
- vs 1. |
Dash = bullets, numbers = steps |
\| tables |
Pipes are cell walls |
: alignment |
Colons point the direction |
Fab Academy Paths
[Download file](files/filename.ext)
{ width="400" }
[Another week](../weekXX/index.md)
MkDocs Configuration & Features
Useful Theme Features
Add these to your mkdocs.yml under the theme section:
theme:
name: material
features:
- navigation.indexes
- navigation.tabs
- navigation.tabs.sticky
- content.code.copy # Adds copy button to code blocks
- content.code.annotate # Allows annotations in code
Enhanced Code Blocks
For syntax highlighting and better code block support, add these extensions:
If you get an error about pymdownx.superfences, install the extension:
Abbreviations (Hover Definitions)
Add tooltip definitions for terms. First enable the extension:
Then in your markdown:
The CNC uses a spindle to cut material.
*[CNC]: Computer Numerical Control
*[spindle]: Rotating component that holds the cutting bit
Hover over "CNC" or "spindle" to see the definition.
Link Tooltips
Add a title attribute for simple hover text on links:
Virtual Environment Quick Reference
| Action | Command |
|---|---|
| Create venv | python3 -m venv venv |
| Activate venv | source venv/bin/activate |
| Deactivate venv | deactivate |
| Check if active | Look for (venv) in your prompt |
| Install MkDocs | pip install mkdocs mkdocs-material |
| Install extensions | pip install pymdown-extensions |
| Preview site | mkdocs serve |
Common Issues & Fixes
| Issue | Cause | Fix |
|---|---|---|
mkdocs: command not found |
Virtual environment not activated | Run source venv/bin/activate |
Failed to load extension 'pymdownx.superfences' |
Extension not installed | Run pip install pymdown-extensions |
| Copy button not appearing | Wrong feature name | Use content.code.copy (not content.copy.code) |
| Admonitions not rendering | Extension not enabled | Add - admonition to markdown_extensions |
Added 2/4/2026
Automatic Heading Anchors
MkDocs automatically generates anchor IDs for all headings by converting them to lowercase and replacing spaces with hyphens.
| Heading | Auto-Generated Anchor |
|---|---|
## My Section |
#my-section |
## Week 2: CAD Design |
#week-2-cad-design |
## 3D Printing Setup |
#3d-printing-setup |
Custom Anchor IDs
Use the {#custom-id} syntax to define your own anchor ID for a heading. Requires the attr_list extension.
Inline Anchors (Without Headings)
To create an anchor point anywhere in your document without a visible heading:
Method 1: Using attr_list
Method 2: Using HTML
Cross-Page Links
Link to a specific section on another page by combining the relative file path with the anchor.
[Link to section on another page](other-page.md#section-name)
[Week 1 Documentation](fab_w01_overview.md#materials-list)
Required Configuration
Add attr_list to your mkdocs.yml to enable custom anchor IDs:
Print this and keep it at your workstation!