What Markdown Extensions Does HowToCook Support? A Complete Guide
The HowToCook repository supports nine specialized Markdown extensions including admonitions, collapsible details, Mermaid diagrams, and GitHub-style task lists, all configured in the MkDocs template file.
The HowToCook project is a community-driven recipe repository that uses MkDocs-Material to render its documentation. Understanding what Markdown extensions are supported helps contributors format recipes correctly. All enabled features are declared in the markdown_extensions section of .github/templates/mkdocs_template.yml.
Complete List of Markdown Extensions in HowToCook
The following extensions are activated in the HowToCook build configuration:
| Extension | Purpose |
|---|---|
| admonition | Creates callout blocks like notes, tips, and warnings |
| pymdownx.details | Enables collapsible content using HTML <details> elements |
| pymdownx.superfences | Extends code blocks with syntax highlighting and Mermaid diagram support |
| abbr | Allows abbreviation definitions (*[HTML]: HyperText Markup Language) |
| pymdownx.snippets | Embeds external files or sections from other Markdown files |
| def_list | Supports definition lists (Term: Definition) |
| pymdownx.tasklist | Renders GitHub-style task lists with custom checkboxes |
| attr_list | Permits attribute blocks on elements ({.class #id}) |
How to Use Each Markdown Extension
Admonition Blocks
Use triple exclamation marks to create highlighted callouts for cooking tips or warnings.
!!! note "Cooking Tip"
Keep your knives sharp for cleaner cuts.
Collapsible Details
Create expandable sections for optional information using question marks.
??? note "Why soak rice?"
Soaking reduces cooking time and improves texture.
SuperFences and Mermaid Diagrams
Embed syntax-highlighted code or flowcharts directly in your recipes.
```mermaid
graph LR
A[Ingredients] --> B[Prep]
B --> C[Cook]
C --> D[Serve]
### Abbreviations
Define terms once, use them throughout the document.
```markdown
*[HTML]: HyperText Markup Language
I love writing HTML.
Snippets
Include shared content like common preparation steps.
!!! include "tips/厨房准备.md"
Definition Lists
Format ingredient descriptions cleanly.
Eggs
: A protein-rich ingredient used in many dishes.
Task Lists
Track preparation steps with checkboxes.
- [ ] Buy vegetables
- [x] Trim the meat
Attribute Lists
Apply custom styling to headings or images.
## Ingredients {.underline #ingredients}
Configuration Source
All extensions are declared in .github/templates/mkdocs_template.yml, the MkDocs configuration template used to build the HowToCook documentation site. This file defines the markdown_extensions array that loads the Python-Markdown ecosystem plus the pymdown-extensions collection when the site is rendered.
Summary
- HowToCook uses MkDocs-Material with nine specific Markdown extensions enabled
- Key features include admonitions, collapsible details, Mermaid diagrams, and task lists
- All extensions are configured in
.github/templates/mkdocs_template.yml - Contributors can use these extensions immediately in any recipe file under the
dishes/directory
Frequently Asked Questions
Does HowToCook support standard GitHub Flavored Markdown?
Yes, the repository supports standard GitHub Flavored Markdown syntax including tables, strikethrough, and autolinks. Additionally, the MkDocs configuration enables pymdownx extensions that provide GitHub-style task lists with custom checkbox rendering.
Can I embed Mermaid diagrams in HowToCook recipes?
Yes, the pymdownx.superfences extension enables Mermaid diagram support. You can create flowcharts, sequence diagrams, and other visualizations by specifying mermaid as the language in fenced code blocks.
Where are the Markdown extensions configured in the repository?
The extensions are defined in the file .github/templates/mkdocs_template.yml within the markdown_extensions section. This configuration template is used when building the documentation site with MkDocs.
Have a question about this repo?
These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →