MyST Parser

5.0.0 · active · verified Thu Apr 09

MyST-Parser is an extended CommonMark compliant parser that enables writing MyST (Markedly Structured Text) Markdown in Sphinx and Docutils projects. It provides a Python library for parsing MyST Markdown to various output formats, including docutils, and a Sphinx extension for seamless integration. The current version is 5.0.0, and the project maintains an active release cadence, with several updates per year, focusing on compatibility and new features.

Warnings

Install

Imports

Quickstart

To quickly get started, add `myst_parser` to your Sphinx `conf.py` extensions list. This enables parsing of `.md` files as MyST Markdown. You can also configure various MyST extensions like `colon_fence` or `admonition` via `myst_enable_extensions` in `conf.py` or through frontmatter in individual documents.

# conf.py
extensions = [
    "myst_parser",
    "sphinx.ext.autodoc"
]

# Enable common MyST extensions
myst_enable_extensions = [
    "colon_fence",
    "deflist",
    "fieldlist",
    "html_admonition",
    "html_image",
    "linkify",
    "replacements",
    "smartquotes",
    "strikethrough",
    "substitution",
    "tasklist"
]

# index.md
# MyST Project

This is some **MyST Markdown** content.

:::{note}
This is a MyST admonition.
:::

view raw JSON →