Skip to content

Commit 288c6a8

Browse files
Break documentation style guide out into its own file (#9813)
* Break documentation style guide out into its own file. This is the start of a larger style guide that we should have, trying to capture places where we make decisions. * Link to glossary * Add to toctree * Apply suggestions from code review Co-authored-by: Benjamin Balder Bach <[email protected]> * Update docs/dev/style-guide.rst Co-authored-by: Benjamin Balder Bach <[email protected]> * Update style-guide.rst * Update style-guide.rst * Fix lint Co-authored-by: Benjamin Balder Bach <[email protected]>
1 parent af0d328 commit 288c6a8

File tree

3 files changed

+70
-33
lines changed

3 files changed

+70
-33
lines changed

docs/dev/docs.rst

-33
Original file line numberDiff line numberDiff line change
@@ -67,36 +67,3 @@ you may want to verify those changes locally before pushing upstream.
6767
(.venv) $ RTD_DOCSET=dev make livehtml
6868
6969
#. the documents will be available at http://127.0.0.1:4444/ and will rebuild each time you edit and save a file.
70-
71-
Guidelines
72-
----------
73-
74-
Please follow these guidelines when updating our docs.
75-
Let us know if you have any questions or something isn't clear.
76-
77-
The brand
78-
^^^^^^^^^
79-
80-
We are called **Read the Docs**.
81-
The *the* is not capitalized.
82-
83-
We do however use the acronym **RTD**.
84-
85-
Titles
86-
^^^^^^
87-
88-
For page titles, or Heading1 as they are sometimes called, we use title-case.
89-
90-
If the page includes multiple sub-headings (H2, H3),
91-
we usually use sentence-case unless the titles include terminology that is supposed to be capitalized.
92-
93-
Content
94-
^^^^^^^
95-
96-
* Do not break the content across multiple lines at 80 characters,
97-
but rather break them on semantic meaning (e.g. periods or commas).
98-
Read more about this `here <https://rhodesmill.org/brandon/2012/one-sentence-per-line/>`_.
99-
* If you are cross-referencing to a different page within our website,
100-
use the ``doc`` role and not a hyperlink.
101-
* If you are cross-referencing to a section within our website,
102-
use the ``ref`` role with the label from the `autosectionlabel extension <http://www.sphinx-doc.org/en/master/usage/extensions/autosectionlabel.html>`__.

docs/dev/index.rst

+1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ or taking the open source Read the Docs codebase for your own custom installatio
2222
guides/index
2323
design
2424
docs
25+
style-guide
2526
front-end
2627
i18n
2728
server-side-search

docs/dev/style-guide.rst

+69
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
Documentation Style Guide
2+
=========================
3+
4+
This document will serve as the canonical place to define how we write documentation at Read the Docs.
5+
The goal is to have a shared understanding of how things are done,
6+
and document the conventions that we follow.
7+
8+
Let us know if you have any questions or something isn't clear.
9+
10+
The brand
11+
---------
12+
13+
We are called **Read the Docs**.
14+
The ``the`` is not capitalized.
15+
16+
We do however use the acronym **RTD**.
17+
18+
Titles
19+
------
20+
21+
For page titles we use sentence case.
22+
This means only proper nouns and the first word are capitalized::
23+
24+
# Good ✅
25+
How we handle support on Read the Docs.
26+
27+
# Bad 🔴
28+
How we Handle Support on Read the Docs
29+
30+
If the page includes multiple sub-headings (H2, H3),
31+
we use sentence case there as well.
32+
33+
Content
34+
-------
35+
36+
* Use ``:menuselection:`` when referring to an item or sequence of items in navigation.
37+
* Use ``:guilabel:`` when referring to a visual element on the screen - such as a button, drop down or input field.
38+
* Use ``**bold text**`` when referring to a non-interactive text element, such as a header.
39+
* Do not break the content across multiple lines at 80 characters,
40+
but rather break them on semantic meaning (e.g. periods or commas).
41+
Read more about this `here <https://rhodesmill.org/brandon/2012/one-sentence-per-line/>`_.
42+
* If you are cross-referencing to a different page within our website,
43+
use the ``doc`` role and not a hyperlink.
44+
* If you are cross-referencing to a section within our website,
45+
use the ``ref`` role with the label from the `autosectionlabel extension <http://www.sphinx-doc.org/en/master/usage/extensions/autosectionlabel.html>`__.
46+
47+
Word List
48+
---------
49+
50+
We have a specific way that we write common words:
51+
52+
* ``Git repository`` for the place that stores Git repos. We used to use ``VCS``, but this is deprecated.
53+
* ``open source`` should be lower case, unless you are definitely referring to `OSI's Open Source Definition <https://opensource.org/osd>`.
54+
* ``Git`` should be upper case, except when referring to the command, when it should be written as `:program:\`git\``.
55+
56+
Glossary
57+
--------
58+
59+
Since the above Word List is for internal reference,
60+
we also maintain a :doc:`rtd:glossary` with terms that have canonical definitions in our docs.
61+
Terms that can otherwise have multiple definitions
62+
*or* have a particular meaning in Read the Docs context
63+
should always be added to the :doc:`rtd:glossary` and referenced using the ``:term:`` role.
64+
65+
Using a glossary helps us (authors) to have consistent definitions
66+
but even more importantly,
67+
it helps and includes readers by giving them quick and easy access to terms that they may be unfamiliar with.
68+
69+
Use an external link or Intersphinx reference when a term is clearly defined elsewhere.

0 commit comments

Comments
 (0)