PyMdown Extensions#
The PyMdown Extensions package is an excellent collection of extensions suited for advanced technical writing. Terminal for MkDocs lists this package as an explicit dependency so it's automatically installed with a supported version.
Suggested PyMdown Extensions#
Caret, Mark & Tilde#
The Caret, Mark, and Tilde extensions add the ability to highlight text
and define subscript and superscript using a simple syntax. Enable them together
via mkdocs.yml
:
markdown_extensions:
- pymdownx.caret
- pymdownx.mark
- pymdownx.tilde
The configuration options of this extension are not specific to Terminal for MkDocs, as they only impact the Markdown parsing stage.
See reference for usage:
Snippets#
The Snippets extension adds the ability to embed content from arbitrary files into a document, including other documents or source files, by using a simple syntax. Enable it via mkdocs.yml
:
markdown_extensions:
- pymdownx.snippets
The configuration options of this extension are not specific to Terminal for MkDocs, as they only impact the Markdown parsing stage. See the Snippets documentation for more information.
See reference for usage:
SuperFences#
The SuperFences extension allows fenced blocks to be nested inside block quotes, lists, or other block elements. Enable it via mkdocs.yml
:
markdown_extensions:
- pymdownx.superfences
This extension is incompatible with the Python Markdown extension markdown.extensions.fenced_code
.
Highlight and InlineHilite#
The Highlight and InlineHilite extensions can be used to highlight code blocks. If used with the PyMdown SuperFences extension line numbers can be added as well. Enable them via mkdocs.yml
:
markdown_extensions:
- pymdownx.superfences
- pymdownx.highlight
- pymdownx.inlinehilite
See reference for recommended configuration options:
Credit#
This documentation page is based on squidfunk's Material for MkDocs Pymdown Extension documentation.