Skip To Article

Read the Docs is a popular platform for hosting documentation that provides free hosting for open source projects and supports automatic builds from your Git repository. This page has important information for how to deploy MyST sites to Read the Docs.

Instructions

To get setup with Read the Docs, ensure that your repository is hosted on GitHub, GitLab, or Bitbucket, and you are in the root of the Git repository. There’s a special init function which adds the proper configuration for deploying to Read the Docs.

🛠 In the root of your git repository run myst init --readthedocs

The command will ask you which Python and Node.js versions to use. It will then create a .readthedocs.yaml configuration file in the root of your repository.[1]

After creating the configuration file, you’ll need to:

🛠 Create an account on readthedocs.org if you don’t have one

🛠 Import your project from your Git hosting provider (GitHub, GitLab, or Bitbucket)

🛠 Commit and push the .readthedocs.yaml file to your repository

Read the Docs will automatically build your documentation on each push. Your documentation will be available at https://YOUR-PROJECT.readthedocs.io.

ReadTheDocs JavaScript might interfere with your site

By default, ReadTheDocs enables documentation addons that execute JavaScript on the page. This may interfere with the React-based rendering that the myst-theme uses. You might see an occasional “flicker” of the content as a result. Experiment with disabling these add-ons and it may improve your outcomes, your mileage may vary!

Example: A Full Read the Docs Configuration

The configuration file below builds and deploys your site automatically. Click the dropdown to show it, and copy/paste/modify as you like.

Footnotes
  1. While MyST builds only require Node.js, the configuration also includes Python. This is useful if you need to execute code in Jupyter notebooks or if you’re using Jupyter Book features alongside MyST.

MyST MarkdownMyST Markdown
Community-driven tools for the future of technical communication and publication, part of Jupyter.