📝 代码执行,变量和模板
Code execution, variables & templating¶
pheasant¶
Auto Python code execution and insertion to the original Markdown source. Any Python codes in a fenced code block of original Markdown source are executed. This process is performed by a Jupyter client. In addition to this code execution, Pheasant can automatically number headers, figures, tables, etc. See the Pheasant official site at Pheasant Home
macros¶
A mini-framework ("Swiss Army knife" of plugins): brings the power of jinja2 to the markdown pages of a MkDocs website.
- author: Laurent Franceschetti fralau
- links: Pypi | Github | Docs
- installation:
pip install mkdocs-macros-plugin
markdownextradata¶
Injects mkdocs.yml->extra: *
variables into your markdown documents. Very powerful for things like {{ client.name }}
or <a href="{{ client.website }}"><img alt="{{ client.logo.alt }}" src="{{ client.logo.src }}" /></a>
in your markdown and not in the theme template.html files.
- author: Ross Crawford-d’Heureuse rosscdh
- links: Pypi | Github | Docs
- installation:
pip install mkdocs-markdownextradata-plugin
jinja2sandbox¶
Enables the Jinja2-sandbox in the MkDocs-templates.
- author: Roland Koebler rkoe
- links Github | Docs
- installation:
pip install git+https://github.com/rkoe/mkdocs-jinja2sandbox
jinja2¶
Allows the use of Jinja2 templates inside Markdown content. It can be useful, for example, to enumerate pages or use the configuration or site navigation data structures from within content. Templates should render to HTML.
Example:
{% for year in ['2018', '2017'] %}
<h3>{{ year }}</h3>
{% for page in pages|sort(attribute='url', reverse=True) %}
{{ page.title }}
<br />
{% endfor %}
{% endfor %}
- author: Andy Oakley andyoakley
- links: Github | Docs
- installation:
pip install git+https://github.com/andyoakley/mkdocs-jinja2
gen-files¶
Generate documentation pages virtually during the build, using a Python scripting API. No more hacky Bash scripts that you forget to re-run!
mkdocs-markmap¶
Introduce mindmaps to your documents by either inline markdown conversion or separate file inclusion.
nbconvert (tanbro)¶
Source parser for *.ipynb
Jupyter Notebook files
- author: liu xue yan tanbro
- links: Pypi | Github | Docs
- installation:
pip install https://pypi.org/project/mkdocs-nbconvert/
nbconvert (andyoakley)¶
This mkdocs plugin uses nbconvert
to convert Jupyter notebooks into Markdown as they are loaded.
- author: Andy Oakley andyoakley
- links: Github | Docs
- installation:
pip install git+https://github.com/andyoakley/mkdocs-nbconvert/
mknotebooks¶
Includes Jupyter notebooks in your project documentation.
mkdocs-jupyter¶
Add Jupyter Notebooks directly to the mkdocs navigation.
- author: Daniel Rodriguez danielfrg
- links: Pypi | Github | Docs
- installation:
pip install mkdocs-jupyter
codeyaml¶
Injects the mkdocs.yml extra variables PLUS extra YML files into the markdown template.
- author: textile.io textileio
- links: Github | Docs
- installation:
pip install git+https://github.com/textileio/mkdocs-codeyaml-plugin
markdown-filter¶
Adds a markdown filter to the Jinja templating engine in mkdocs.
- author: Byrne Reese byrnereese
- links: Pypi | Github | Docs
- installation:
pip install mkdocs-markdown-filter
theme-jinja2-filters¶
Lets you use Jinja2 filters.
- author: Benedikt Reiser burnedikt
- links: Github | Docs
- installation:
pip install git+https://github.com/burnedikt/mkdocs-jinja2-filters-plugin
mathy¶
Renders mathy-specific elements in a mkdocs page by template substitution. Mathy is a A modern computer algebra system and reinforcement learning environments platform for interpretable symbolic mathematics.
- author Justin DuJardin justindujardin
- links: Plugin on Github | Mathy on Github | Site
user-defined-values¶
Allows pages to have user-defined input values.
- author: Rahul Trikha rahult
- links: Pypi | Github | Docs
- installation:
pip install mkdocs-user-defined-values
mkdocs_protobuf¶
Insert protobuf messages directly into documetnation
mkjsfiddle¶
Enhance code fences with an "Edit in JSFiddle" button.
- author: Stadia Maps stadiamaps
- links: PyPI | Github
- installation:
pip install mkjsfiddle