Skip to content

Commit 9518189

Browse files
committed
Update README and include in index.rst
1 parent be25ff3 commit 9518189

File tree

3 files changed

+69
-2
lines changed

3 files changed

+69
-2
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ __pycache__/
66
# C extensions
77
*.so
88

9+
# auto-generated Sphinx api docs
10+
/docs/generated
11+
912
# Distribution / packaging
1013
.Python
1114
build/

README.rst

Lines changed: 64 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,64 @@
1-
# example-sphinx-basic
2-
A basic Sphinx project
1+
Example: Basic Sphinx project for Read the Docs
2+
===============================================
3+
4+
This example shows the following basic integration with Read the Docs:
5+
6+
* A basic Sphinx project lives in ``docs/`` 📚
7+
* Read the Docs Build configuration is stored in ``.readthedocs.yaml`` ⚙️
8+
* Python dependencies are `pinned <https://docs.readthedocs.io/en/latest/guides/reproducible-builds.html>`_ 📍
9+
* Auto-generated API docs for a Python module called ``lumache`` 💡
10+
* Sphinx documentation integrates Python docstrings directly from ``lumache`` 💡
11+
* A basic versioning mechanism with git tags 🔢
12+
* Contents of this ``README.rst`` are visible on Github and included on `the documentation index page <https://example-sphinx-basic.readthedocs.io/en/latest/>`_ (Don't Repeat Yourself) 📜
13+
* If you have questions related to this example, feel free to can ask them as a Github issue `here <https://github.com/readthedocs-examples/example-sphinx-basic/issues>`_. ⁉️
14+
15+
16+
Sphinx Example Project usage
17+
----------------------------
18+
19+
This project has a very normal Sphinx layout which is built by the Read the Docs platform almost the same way that you would build it locally (on your own laptop!).
20+
21+
You can build and view this documentation project locally - you may want to activate `a local Python virtual environment firstly <https://packaging.python.org/en/latest/guides/installing-using-pip-and-virtual-environments/#creating-a-virtual-environment>`_:
22+
23+
.. code-block:: console
24+
25+
# Install required Python dependencies (Sphinx etc.)
26+
pip install -r docs/requirements.txt
27+
28+
# Enter the Sphinx project
29+
cd docs/
30+
make html
31+
32+
33+
You can also build the documentation locally with ``make``:
34+
35+
.. code-block:: console
36+
37+
# Enter the Sphinx project
38+
cd docs/
39+
40+
# Build with make
41+
make html
42+
43+
# Open with your preferred browser
44+
firefox _build/html/index.html
45+
46+
47+
Using the example in your own project
48+
-------------------------------------
49+
50+
If you are new to Read the Docs, you may want to refer to the `Read the Docs User documentation <https://docs.readthedocs.io/>`_.
51+
52+
If you are copying this code in order to get started with your documentation, you need to:
53+
54+
* Create a new repository on Github, GitLab, Bitbucket or another host supported by Read the Docs
55+
* Customize all ``docs/*.rst`` files
56+
* Add your own Python project, replacing the ``pyproject.toml`` configuration and ``lumache.py`` module.
57+
* Rebuild the documenation locally to see that it works.
58+
* Register your project on Read the Docs, see `Importing Your Documentation <https://docs.readthedocs.io/en/stable/intro/import-guide.html>`_.
59+
60+
61+
Read the Docs tutorial
62+
----------------------
63+
64+
To get started with Read the Docs, you may also refer to the `Read the Docs tutorial <https://docs.readthedocs.io/en/stable/tutorial/>`_

docs/index.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
.. include:: ../README.rst
2+
13
Welcome to Lumache's documentation!
24
===================================
35

0 commit comments

Comments
 (0)