跳转至

📝 代码执行,变量和模板

Code execution, variables & templating

pheasant

PyPI - Downloads

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

PyPI - Downloads

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

PyPI - Downloads

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

PyPI - Downloads

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

PyPI - Downloads

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

PyPI - Downloads

Includes Jupyter notebooks in your project documentation.

mkdocs-jupyter

PyPI - Downloads

Add Jupyter Notebooks directly to the mkdocs navigation.

codeyaml

PyPI - Downloads

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

PyPI - Downloads

Adds a markdown filter to the Jinja templating engine in mkdocs.

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.

user-defined-values

PyPI - Downloads

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

PyPI - Downloads

Insert protobuf messages directly into documetnation

mkjsfiddle

PyPI - Downloads

Enhance code fences with an "Edit in JSFiddle" button.