Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 4 additions & 63 deletions source/tutorials/creating-documentation.rst
Original file line number Diff line number Diff line change
@@ -1,66 +1,7 @@
.. _creating-documentation:
:orphan:

Creating documentation
======================
Creating Documentation
======================

This section covers the basics of how to create documentation using `Sphinx`_ and
host the documentation for free in `Read The Docs`_.

.. _Sphinx: https://www.sphinx-doc.org
.. _Read The Docs: https://readthedocs.org/

Installing Sphinx
-----------------
Use ``pip`` to install Sphinx:

.. tab:: Unix/macOS

.. code-block:: bash

python3 -m pip install --upgrade sphinx

.. tab:: Windows

.. code-block:: bat

py -m pip install --upgrade sphinx

For other installation methods, see this :doc:`installation guide <sphinx:usage/installation>` by Sphinx.


Getting Started With Sphinx
---------------------------

Create a ``docs`` directory inside your project to hold your documentation:

.. code-block:: bash

cd /path/to/project
mkdir docs

Run ``sphinx-quickstart`` inside the ``docs`` directory:

.. code-block:: bash

cd docs
sphinx-quickstart

This sets up a source directory, walks you through some basic configurations, and creates an ``index.rst`` file as well as a ``conf.py`` file.

You can add some information about your project in ``index.rst``, then build them:

.. code-block:: bash

make html

For more details on the build process, see this `guide`_ by Read The Docs.

.. _guide: https://docs.readthedocs.io/en/latest/intro/import-guide.html

Other Sources
-------------

For a more detailed guide on how to use Sphinx and reStructuredText, please see this `documentation tutorial`_ on Hitchhiker's Guide to Python.

.. _documentation tutorial: https://docs.python-guide.org/writing/documentation/
This tutorial has been removed since it is not related to packaging and was unmaintained.
Please see the `Sphinx tutorial <https://www.sphinx-doc.org/en/master/tutorial>`_ instead.
1 change: 0 additions & 1 deletion source/tutorials/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,3 @@ topics, see :doc:`/guides/index`.
installing-packages
managing-dependencies
packaging-projects
creating-documentation