mystjs

mystjs on npm MIT License CI docs

MyST is a flavor of markdown inspired from the Sphinx ecosystem and RST.

Any CommonMark markdown (such as Jupyter Notebook markdown) is natively supported by the MyST parser. The goal of MyST javascript parser (mystjs) is to have overlap with Sphinx ecosystem and RST and provide a flexible parser and renderer that can be used with other content workflows.

Important

For integration with Sphinx, use the Python reference implementation for MyST parser, which can be found at:

https://myst-parser.readthedocs.io/en/latest/

The following documentation refers only to the Javascript MyST parser.

The focus of mystjs is on components that are useful in rendering books, papers & reorts. This project is associated with JupyterBook and maintained by the Executable Books Community.

Package Responsibilities

The mystjs package provides a Javascript implementation of the MyST parser, with the many of the standard directives and roles included.

  • Parse MyST flavored markdown, which includes directives, roles, and block elements

  • Export a Markdown Abstract Syntax Tree (mdast) that is tested against the MyST specification

  • Provide extension point for additional directives and roles to be added

  • Provide a serializer into standard html for all known roles and directives

    • CSS styling will not be enforced or provided by this repository

  • Provide extension point for cross-referencing between multiple documents

Supported Syntax

  • Commonmark Markdown

  • Admonitions (callouts)

  • References and citations

  • Figures, with cross-references

  • Math & equations, with cross-references

  • Common roles and directives that constitute “Core MyST”