Skip to content

Commit 0587ffa

Browse files
committed
Update "Example project usage" section
1 parent 5134142 commit 0587ffa

File tree

2 files changed

+12
-23
lines changed

2 files changed

+12
-23
lines changed

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
docs/conf.py
2-
docs/_build
1+
/docs/conf.py
2+
/docs/_build

README.rst

Lines changed: 10 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ This example shows a Jupyter Book project with Read the Docs. You're encouraged
2828
Example Project usage
2929
---------------------
3030

31-
This project has a standard Sphinx layout which is built by Read the Docs almost the same way that you would build it locally (on your own laptop!).
31+
This project has a standard Jupyter Book layout which is built by Read the Docs almost the same way that you would build it locally (on your own laptop!).
3232

3333
You can build and view this documentation project locally - we recommend that you activate `a local Python virtual environment first <https://packaging.python.org/en/latest/guides/installing-using-pip-and-virtual-environments/#creating-a-virtual-environment>`_:
3434

@@ -37,25 +37,11 @@ You can build and view this documentation project locally - we recommend that yo
3737
# Install required Python dependencies (Sphinx etc.)
3838
pip install -r docs/requirements.txt
3939
40-
# Enter the Sphinx project
41-
cd docs/
40+
# Run Jupyter Book
41+
jupyter-book build docs/
4242
43-
# Run the raw sphinx-build command
44-
sphinx-build -M html . _build/
45-
46-
47-
You can also build the documentation locally with ``make``:
48-
49-
.. code-block:: console
50-
51-
# Enter the Sphinx project
52-
cd docs/
53-
54-
# Build with make
55-
make html
56-
57-
# Open with your preferred browser, pointing it to the documentation index page
58-
firefox _build/html/index.html
43+
# View the docs with for instance firefox
44+
firefox docs/_build/index.html
5945
6046
6147
Using the example in your own project
@@ -65,11 +51,14 @@ If you are new to Read the Docs, you may want to refer to the `Read the Docs Use
6551

6652
If you are copying this code in order to get started with your documentation, you need to:
6753

68-
#. place your ``docs/`` folder alongside your Python project. If you are starting a new project, you can adapt the `pyproject.toml` example configuration.
6954
#. use your existing project repository or create a new repository on Github, GitLab, Bitbucket or another host supported by Read the Docs
7055
#. copy ``.readthedocs.yaml`` and the ``docs/`` folder into your project.
56+
#. if you don't already have a ``.gitignore``, use the one from the project file -- otherwise add these lines::
57+
58+
/docs/conf.py
59+
/docs/_build
60+
7161
#. customize all the files, replacing example contents.
72-
#. add your own Python project, replacing the ``pyproject.toml`` configuration and ``lumache.py`` module.
7362
#. rebuild the documenation locally to see that it works.
7463
#. *finally*, register your project on Read the Docs, see `Importing Your Documentation <https://docs.readthedocs.io/en/stable/intro/import-guide.html>`_.
7564

0 commit comments

Comments
 (0)