Skip to content

MkDocs Plugins

Tommaso Allevi edited this page May 18, 2019 · 23 revisions

This page contains a list of some external MkDocs plugins.

markdownextradata

author: Ross Crawford-d'Heureuse (github/rosscdh)

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.

macros

Expands on the excellent idea of markdownextradata plugin by @github/rosscdh

Brings the power of jinja2 to the markdown pages of a MkDocs website.

Injects variables and macros into markdown pages, e.g. {{ name }}, {{ client.website }}, {{ price(item, quantity) }}. You can define the variables in mkdocs.yml->extra, and write your own macros as python functions in a main.py file in the website's files. Macros can be used to define your own extensions to markdown, e.g. {{ button('Download', 'your_url') }}. Jinja2 variable declarations and constructs can be used within a page.

This plugin is under development, but it is tested and it should probably work for you.

htmlproofer

author: Manu Zhang

This plugin validates URL in rendered html files.

jinja2sandbox

author: Roland Koebler

Enable the Jinja2-sandbox in the MkDocs-templates.

Hello Dolly

A very basic MkDocs plugin which substitutes every occurrence of {{dolly}} in your documents with random lyrics from the song "Hello Dolly!".

add-teaser

author: Lars Wilhelmer

Add a custom CSS class to the first paragraph after the first heading 1 in all pages of your project. This is useful if the first paragraph of your pages always contains information that should stand out from the rest of the text, e.g., that should be printed in bold.

Apache Cordova

author: Lucas Ramage

Deploy documentation to any mobile device via Apache Cordova.

This plugin is under development, but it is tested and it should probably work for you.

git-revision-date

A very simple plugin that uses git to fetch the last revision date per markdown file.

git-committers

A plugin for displaying a list of committers associated with a file, as well as the last time the file was edited.

minify

A plugin for minifying a page's HTML just prior to being written to disk.

bootstrap-tables

A plugin that adds Bootstrap classes to plain/naked tables generated by Markdown. This improves styling of tables if you are using the Bootstrap CSS framework. It should have no effect for all other tables.

exclude

A plugin that lets you exclude arbitrary file paths and patterns from the input. Normally, mkdocs will include every file in the docs directory in the output, which is not always what you want.

markdown-filter

A plugin that adds a markdown filter to the Jinja templating engine in mkdocs.

docstyler

Adds persistent, preferred and/or alternate stylesheet links to custom MkDocs themes.

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, etcs. See the Pheasant official site at Pheasant Home

mkdocs-redirects

Makes it easy to create dynamic page redirects, so you can move docs around and prevent broken links. Instead of using the meta "redirect:" support (which requires you to have extraneous Markdown files cluttering up your docs folder), this plugin dynamically generates the meta redirect HTML pages in the site_dir based on configuration in mkdocs.yml mapping old paths to new page locations.

mkdocs-edit-url

The plugin adds the ability to use a edit_url: meta field in your markdown pages. Meaning you can override the default edit_url value built by MkDocs (from the edit_uri configuration option). This is particularly useful if some of your documentation pages are taken from another source (another repository, a external wiki such as github/gitlab...).

mkdocs-swagger-plugin

The plugin allows you to create form to invoke APIs from swagger definition easily.

You can’t perform that action at this time.