Compile Markdown into HTML with Mistune instead of python-markdown

To install, run nikola plugin -i mistune

This plugin is an alternative to the markdown plugin (which is using python-markdown), pandoc (using Pandoc, which handles many more input formats), and misaka (yet another custom Markdown implementation). All the plugins can be used on one site, provided that file extensions differ.

This one is based on mistune which is impresively fast (only 50% slower than misaka) while being pure python.

For context: CommonMark is 2.5x slower than Mistune, and Python Markdown is a mind-boggling 60x slower.

This plugin does not support MarkdownExtension plugins. They are only compatible with the markdown plugin and python-markdown.

Research on using Mistune extensions with Nikola is needed.

Suggested Configuration:

# In order to use Mistune, you must either disable the original
# Markdown plugin, or use different file extensions for the two.

    "mistune": ('.md', '.mdown', '.markdown'),

    ("posts/*.md", "posts", "post.tmpl"),
    ("posts/*.mdown", "posts", "post.tmpl"),
    ("posts/*.markdown", "posts", "post.tmpl"),
    ("stories/*.md", "stories", "story.tmpl"),
    ("stories/*.mdown", "stories", "story.tmpl"),
    ("stories/*.markdown", "stories", "story.tmpl"),


  • mistune (Python package)

Issues? Questions?

You can report issues with this plugin and request help via GitHub Issues.