Skip to content

Improve documentation on contributing to documentation #8082

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 19 commits into from
Apr 15, 2021
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
59 changes: 52 additions & 7 deletions docs/development/docs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,32 +5,77 @@ As one might expect,
the documentation for Read the Docs is built using Sphinx and hosted on Read the Docs.
The docs are kept in the ``docs/`` directory at the top of the source tree.

.. TODO: expand this section explaining there the PR is automatically built and
the author can visualize changes without installing anything on their system.
However, if there is going to be periodic/bigger contributions, it may be a
good idea to install the Sphinx requirements to build our docs.
Contributing through the Github UI
----------------------------------

If you're making small changes to the documentation,
you can verify those changes through the documentation generated when you open a PR and can be accessed using the Github UI.

#. click the checkmark next to your commit and it will expand to have multiple options

#. right-click the "details" link next to the "docs/readthedocs.org:docs" item

.. image:: /img/details_link.png

#. navigate to the section of the documentation you worked on to verify your changes

Contributing from your local machine
------------------------------------

.. note::

You must use python 3.6 to generate the documentation.

If you're making large changes to the documentation,
you may want to verify those changes locally before pushing upstream.

#. clone the `readthedocs.org` repository:

.. prompt:: bash

git clone --recurse-submodules https://github.com/readthedocs/readthedocs.org/

#. install documentation requirements

.. prompt:: bash

cd readthedocs.org
pip install -r requirements/testing.txt
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need requirements/testing.txt to work on the docs?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At the moment they're needed, yes. Otherwise some dependencies are missing.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(It's up to debate whether we should organize our dependencies in a better way, or improve the naming of the requirements files, see #7037 (comment))

pip install -r requirements/docs.txt
Comment on lines +43 to +44
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't we walk the user through the steps to create a virtualenv for this?


#. build the documents

.. prompt:: bash

cd docs
make livehtml

#. the documents will be available at http://127.0.0.1:4444/ and will rebuild each time you edit and save a file.

Guidelines
----------

Please follow these guidelines when updating our docs.
Let us know if you have any questions or something isn't clear.

The brand
---------
^^^^^^^^^

We are called **Read the Docs**.
The *the* is not capitalized.

We do however use the acronym **RTD**.

Titles
------
^^^^^^

For page titles, or Heading1 as they are sometimes called, we use title-case.

If the page includes multiple sub-headings (H2, H3),
we usually use sentence-case unless the titles include terminology that is supposed to be capitalized.

Content
-------
^^^^^^^

* Do not break the content across multiple lines at 80 characters,
but rather break them on semantic meaning (e.g. periods or commas).
Expand Down
Binary file added docs/img/details_link.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions requirements/docs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ sphinx-prompt==1.4.0
sphinx-notfound-page==0.6
commonmark==0.9.1
recommonmark==0.7.1
sphinx-autobuild==2021.3.14

# Linting
rstcheck==3.3.1