-
Notifications
You must be signed in to change notification settings - Fork 189
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
109 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# The MyST implementation architecture | ||
|
||
This page describes implementation details to help you understand the structure | ||
of the project. | ||
|
||
```{note} | ||
MyST currently relies on | ||
[a fork of the Mistletoe project](https://github.com/ExecutableBookProject/mistletoe). | ||
We hope to upstream these changes, but in the meantime make sure that you are using | ||
this fork. | ||
``` | ||
|
||
## An extension to Mistletoe syntax | ||
|
||
At a high level, the MyST parser is an extension of the Mistletoe project. Mistletoe | ||
is a well-structured Python parser for CommonMark text. It also defines an extension | ||
point to include more syntax in parsed files. The MyST parser uses this extension | ||
point to define its own syntax options (e.g., for Sphinx roles and directives). | ||
|
||
The result of this parser is a Mistletoe AST. | ||
|
||
## A docutils renderer | ||
|
||
The MyST parser also defines a docutils renderer for the Mistletoe AST. This allows us | ||
to convert parsed elements of a MyST markdown file into docutils. | ||
|
||
## A Sphinx parser | ||
|
||
Finally, the MyST parser provides a parser for Sphinx, the documentation generation | ||
system. This parser does the following: | ||
|
||
* Parse markdown files with the MyST Mistletoe parser | ||
* Convert these files into docutils objects using the MyST docutils renderer | ||
* Provide these to Sphinx in order to use in building your site. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,4 +5,5 @@ codebase, and some guidelines for how you can contribute. | |
|
||
```{toctree} | ||
contributing.md | ||
architecture.md | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Installing the MyST Parser | ||
|
||
Installing the MyST parser provides access to two tools: | ||
|
||
* A MyST-to-docutils parser and renderer. | ||
* A Sphinx parser that utilizes the above tool in building your documenation. | ||
|
||
To install the MyST parser, run the following: | ||
|
||
```bash | ||
pip install -e "git+https://github.com/ExecutableBookProject/myst_parser.git#egg=myst_parser[sphinx]" | ||
``` | ||
|
||
Or for package development: | ||
|
||
```bash | ||
git clone https://github.com/ExecutableBookProject/myst_parser | ||
cd myst_parser | ||
git checkout develop | ||
pip install -e .[sphinx,code_style,testing,rtd] | ||
``` | ||
|
||
This should install the myst fork of mistletoe, along with the Sphinx parser | ||
that is included in the "extensions" configuration of this site. |