@@ -124,11 +124,37 @@ explanation.
124
124
provide context, make connections between topics, and discuss alternative
125
125
opinions. There is no section dedicated to explanations but these can be
126
126
found throughout Python's documentation, for example the
127
- :ref: `python:unicode-howto `
127
+ :ref: `python:unicode-howto `.
128
128
129
129
Please consult the `Diátaxis <https://diataxis.fr/ >`_ guide for more
130
130
detail.
131
131
132
+ Links
133
+ =====
134
+
135
+ Linking words to more information about those words is a powerful tool for
136
+ helping people navigate documentation, but links can be over-used.
137
+
138
+ Links should be provided only if they help the user. If a link will not help
139
+ the user, do not create a link. You may need to suppress a link that Sphinx
140
+ would have created automatically.
141
+
142
+ Generally, a link should be provided for the first use of a term in a unit This
143
+ is not a hard and fast rule. Sometimes the second mention is a more
144
+ appropriate jumping off point. Some units are long enough to have a few
145
+ repeated links. Use judgement to decide if a link would help the reader.
146
+
147
+ Do not use a link when the link would point to the current unit. It's natural
148
+ to use the name of a function in the documentation for the function, but a link
149
+ on that function name that simply reloads the section the user is already
150
+ reading is useless and distracting.
151
+
152
+ Sphinx provides ways to automatically add links to references, and a way to
153
+ suppress the link. Using roles like ``:func:`map` `` will link to the
154
+ documentation for ``map ``. You can suppress the link while keeping the
155
+ semantic presentation of the function name by adding an exclamation point
156
+ prefix: ``:func:`!map` ``.
157
+
132
158
Affirmative tone
133
159
================
134
160
0 commit comments