Markdown Extensions¶
All of the following are available in any .md page on this site. Extensions are grouped by what they do.
Callouts & admonitions¶
Admonitions¶
Block-level callout boxes. The keyword after !!! sets the type and colour.
!!! note "Optional custom title"
Body text goes here, indented by four spaces.
!!! warning
Title defaults to the type name if omitted.
Available types: note info tip success question warning danger bug example quote
Collapsible details¶
Swap !!! for ??? to make a callout collapsible. Add + to start it open:
??? tip "Click to expand"
This content is hidden until the user opens it.
???+ warning "Open by default"
Starts expanded.
Code¶
Fenced code blocks¶
Use triple backticks with an optional language identifier for syntax highlighting:
Line numbers:
Highlight specific lines:
Add a title:
Code annotations¶
Add numbered annotations to code blocks using # (1) markers. The content.code.annotate theme feature must be on (it is):
- This is the title shown in the browser tab and the social card.
Inline code highlighting¶
Use #! followed by the language inside backticks for inline syntax:
Mermaid diagrams¶
Fenced blocks with the mermaid language identifier render as diagrams:
Supported diagram types: graph, sequenceDiagram, classDiagram, stateDiagram, erDiagram, gantt, pie, and more — see Mermaid docs.
Content layout¶
Tabbed content¶
Group content under switchable tabs. All tab sets with the same labels stay in sync across the page (content.tabs.link is on):
=== "Windows"
```powershell
winget install git
```
=== "Linux"
```bash
sudo apt install git
```
=== "macOS"
```bash
brew install git
```
Grid cards¶
A responsive card grid. Requires attr_list and md_in_html (both enabled):
<div class="grid cards" markdown>
- :material-file-document:{ .lg .middle } **Card Title**
---
Description text goes here.
[:octicons-arrow-right-24: Link text](target.md)
</div>
Icons use the :material-icon-name: or :octicons-icon-name: syntax — see the emoji section below.
Attribute lists¶
Add HTML classes, IDs, or attributes to any element. Used for buttons, image sizing, and custom styling:
[Primary button](url){ .md-button .md-button--primary }
[Secondary button](url){ .md-button }
{ width="400" }
Lists¶
Task lists¶
Definition lists¶
Text formatting¶
Highlighting, underline, strikethrough, superscript, subscript¶
| Syntax | Result | Extension |
|---|---|---|
==highlighted== | highlighted | pymdownx.mark |
^^underline^^ | underline | pymdownx.caret |
~~strikethrough~~ | pymdownx.tilde | |
^superscript^ | superscript | pymdownx.caret |
~subscript~ | subscript | pymdownx.tilde |
Keyboard keys¶
Renders key combinations as styled key caps:
Available key names: Ctrl, Alt, Shift, Win, Tab, Enter, Esc, F1 through F12, letter/number keys, and more — see the Keys docs.
Smart symbols¶
Automatic typographic replacements:
| Write | Renders as |
|---|---|
(tm) | ™ |
(c) | © |
(r) | ® |
--> | → |
<-- | ← |
+- | +- |
Tables¶
Standard GitHub-Flavoured Markdown tables. Alignment is set with colons in the separator row:
Links & references¶
MagicLink¶
URLs written as plain text are automatically made into clickable links — no brackets needed:
GitHub references are also auto-linked when the repo is configured: user/repo#123 becomes a link to that issue.
Abbreviations¶
Define abbreviations once in a page (or a shared snippets file) and every occurrence is automatically given a tooltip:
The HTML spec defines how CSS is rendered.
*[HTML]: HyperText Markup Language
*[CSS]: Cascading Style Sheets
Footnotes¶
This is a claim that needs a source.[^1]
[^1]: Source text goes here — rendered at the bottom of the page.
Table of contents¶
The toc extension with permalink: true adds a # anchor link to every heading, making sections directly linkable. The sidebar ToC is provided by the theme and follows your scroll (toc.follow is on).
Emoji & icons¶
Use Material, Octicons, or FontAwesome icon shortcodes anywhere in content:
Browse available icons at squidfunk.github.io/mkdocs-material/reference/icons-emojis.
Math¶
Inline math uses \( … \), display (block) math uses \[ … \]:
Rendered by MathJax, loaded from CDN. Standard LaTeX notation applies.