Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add using on Read The Docs instructions #156

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
48 changes: 48 additions & 0 deletions docs/using/on_rtd.md
@@ -0,0 +1,48 @@
# Using on ReadTheDocs

This page describes how to get started with using the MyST parser for documentation generated by and hosted on [Read the Docs](https://readthedocs.org/), which "simplifies software documentation by automating building, versioning, and hosting of your docs for you".

## Example minimal setup

A `.readthedocs.yml` file with this content:

```yaml
version: 2
sphinx:
configuration: docs/conf.py
python:
version: 3
install:
- requirements: docs/requirements.txt
```

```{tip}
See [Read The Docs' configuration file documentation](https://docs.readthedocs.io/en/stable/config-file/index.html) for more
```

A `docs/requirements.txt` with at least this content:

```txt
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code name needs to relate to a pygments lexer: https://pygments.org/docs/lexers/ (not sure what the best one for this is though?)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if plain ``` will look OK, then that i think? If not the notmuch email should work.

myst-parser[sphinx]
```

A `docs/conf.py` file with at least this content:

```python
extensions = [
'myst_parser',
]

source_suffix = ['.rst', '.md']
```

```{tip}
Use `sphinx-quickstart` to create your `conf.py` file and make the above modifications; see [Getting Started with Sphinx](https://docs.readthedocs.io/en/stable/intro/getting-started-with-sphinx.html#quick-start) for more. Just remember that to enable markdown-formatted documentation, you're using MyST Parser *instead* of ReCommonMark. (You still get all of CommonMark, and more!)
```

And now you're good to go, using MyST for your Sphinx-powered, ReadTheDocs-hosted documentation!

```{seealso}
- [Read the Docs documentation](https://docs.readthedocs.io/en/stable/index.html)
- {ref}`The MyST Syntax Guide <using/syntax>`
mlncn marked this conversation as resolved.
Show resolved Hide resolved
```