Built-in typeset plugin¶
The typeset plugin allows to preserve the enriched presentation of titles and headlines within the navigation and table of contents. This means that code blocks, icons, emojis and any other inline formatting can be rendered exactly as defined in the page's content.
Sponsors only – this plugin is currently reserved to our awesome sponsors.
Objective¶
How it works¶
When building your project, MkDocs extracts the plain text from headlines and drops the original formatting. This is generally useful and a good idea, since this information is made available to other plugins that might have problems when being passed HTML instead of plain text.
However, it also means that the entire formatting is lost.
The plugin hooks into the rendering process, extracts the original headlines, and makes them available to be used in templates and plugins. The templates of Material for MkDocs use this information to render an enriched version of the navigation and table of contents.
When to use it¶
It's generally recommended to use the plugin, because it is a drop-in solution that doesn't require any configuration and is designed to work out of the box. Since it doesn't overwrite but only adds information, it's not expected to interfere with other plugins.
Configuration¶
insiders-4.27.0 typeset – built-in
As with all built-in plugins, getting started with the typeset plugin is straightforward. Just add the following lines to mkdocs.yml
, and observe the enriched navigation and table of contents:
The typeset plugin is built into Material for MkDocs and doesn't need to be installed.
General¶
The following settings are available:
enabled
¶
insiders-4.27.0 true
Use this setting to enable or disable the plugin when building your project. It's normally not necessary to specify this setting, but if you want to disable the plugin, use: