MyST - Markedly Structured Text¶
A fully-functional markdown flavor and parser for Sphinx.
MyST allows you to write Sphinx documentation entirely in markdown. MyST markdown provides a markdown equivalent of the reStructuredText syntax, meaning that you can do anything in MyST that you can do with reStructuredText. It is an attempt to have the best of both worlds: the flexibility and extensibility of Sphinx with the simplicity and readability of Markdown.
MyST has the following main features:
- A markdown parser for Sphinx
You can write your entire Sphinx documentation in Markdown.
- Call Sphinx directives and roles from within Markdown
Allowing you to extend your document via Sphinx extensions.
- Extended Markdown syntax for useful rST features
Such as line commenting and footnotes.
- A Sphinx-independent parser of MyST markdown
This can be extended to add new functionality and outputs for MyST.
- A superset of CommonMark markdown
Any CommonMark markdown (such as Jupyter Notebook markdown) is natively supported by the MyST parser.
You may use MyST markdown in addition to using reStructuredText in Sphinx. See Getting Started to get started.
- Getting Started
- Sphinx configuration options
- The MyST Syntax Guide
- Optional MyST Syntaxes
- How-To Guides
- Frequently Asked Questions
- Python API
- The Parser
- Example pages
- Contribute to MyST
- MyST-Parser API reference
- 0.13.7 - 2021-04-25
- 0.13.6 - 2021-04-10
- 0.13.5 - 2021-02-15
- 0.13.3 - 2021-01-20
- 0.13.2 - 2021-01-20
- 0.13.1 - 2020-12-31
- 0.13.0 - 2020-12-18
- 0.12.10 - 2020-09-21
- 0.12.9 - 2020-09-08
- 0.12.7 - 2020-08-31
- 0.12.5 - 2020-08-28
- 0.12.4 - 2020-08-27
- 0.12.3 - 2020-08-26
- 0.12.2 - 2020-08-25
- 0.12.1 - 2020-08-19
- 0.12.0 - 2020-08-19
- 0.11.2 - 2020-07-13
- 0.11.1 - 2020-07-12
- 0.11.0 - 2020-07-12
- 0.10.0 - 2020-07-08
- Past Releases
- GitHub repo
Why MyST markdown?¶
While markdown is ubiquitous, it is not powerful enough for writing modern, fully-featured documentation. Some flavors of markdown support features needed for this, but there is no community standard around various syntactic choices for these features.
Sphinx is a documentation generation framework written in Python. It heavily-utilizes reStructuredText syntax, which is another markup language for writing documents. In particular, Sphinx defines two extension points that are extremely useful: in-line roles and block-level directives.
This project is an attempt at combining the simplicity and readability of Markdown with the power and flexibility of reStructuredText and the Sphinx platform. It starts with the CommonMark markdown specification, and selectively adds a few extra syntax pieces to utilize the most powerful parts of reStructuredText.
The CommonMark community has been discussing an “official” extension syntax for many years now (for example, see this seven-year-old thread about directives as well as this more recent converstaion, and this comment listing several more threads on this topic).
We have chosen a “roles and directives” syntax that seems reasonable and follows other common conventions in Markdown flavors. However, if the CommonMark community ever decides on an “official” extension syntax, we will likely utilize this syntax for MyST.