@@ -17,18 +17,26 @@ To publish your book with {{RTD}}, follow these steps:
...
@@ -17,18 +17,26 @@ To publish your book with {{RTD}}, follow these steps:
1.**Get started with Read the Docs**.
1.**Get started with Read the Docs**.
To do so, follow [the Read the Docs tutorial](https://docs.readthedocs.io/en/stable/tutorial/index.html).
To do so, follow [the Read the Docs tutorial](https://docs.readthedocs.io/en/stable/tutorial/index.html).
Configure {{RTD}} to host a website from your book's repository.
Configure {{RTD}} to host a website from your book's repository.
2.**Create a `.readthedocs.yml` file**.
2.**Create a `.readthedocs.yml` file** in the root of your repository.
This file can configure the behavior of {{RTD}}.
This file configures the behavior of {{RTD}}.
See [the ReadTheDocs documentation on its use](https://docs.readthedocs.io/en/stable/config-file/v2.html).
3.**Add a `pre_build` job to your `.readthedocs.yml` file**.
3.**Add a `pre_build` job to your `.readthedocs.yml` file**.
ReadTheDocs allows you to run extra scripts before and after your documentation is built.
Read theDocs allows you to run extra scripts before and after your documentation is built.
You can use this to [generate the Sphinx configuration](sphinx:convert) for your Jupyter Book before {{RTD}} tries to build it.
You can use this to [generate the Sphinx configuration](sphinx:convert) for your Jupyter Book before {{RTD}} tries to build it.
For example, see the ReadTheDocs configuration that is used to build this book:
For example, this configuration is used to build this book:
```{literalinclude} ../../.readthedocs.yml
```{literalinclude} ../../.readthedocs.yml
:emphasize-lines: 7-10
:emphasize-lines: 7-10
```
```
See [the ReadTheDocs jobs documentation](https://docs.readthedocs.io/en/stable/config-file/v2.html#build-jobs) for more information.
See [the Read theDocs Config File reference](https://docs.readthedocs.io/en/stable/config-file/v2.html) for a full reference to the configuration file options.
{{RTD}} should now automatically generate the Sphinx configuration for your book and build your book's HTML to host it online.
{{RTD}} should now automatically generate the Sphinx configuration for your book and build your book's HTML to host it online.
```{tip}
You can also get started by using this example project from Read the Docs:
* [Example project source code on GitHub](https://github.com/readthedocs-examples/example-jupyter-book)
The project itself can be copied and customized, or you can use it as a reference when you start a Jupyter Book project from scratch that you wish to publish on Read the Docs.