@@ -124,11 +124,39 @@ 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
+ Links should be used only if they help the reader.
138
+
139
+ Generally, a link should be provided for the first use of a term in a unit,
140
+ such as a section or paragraph. This is not a hard and fast rule. Sometimes
141
+ the second mention is more appropriate for a link. Some units are long enough
142
+ to have a few repeated links. Use judgement to decide when a link will help
143
+ the reader.
144
+
145
+ Do not use a link when the link would point to the current unit. It's natural
146
+ to use the name of a function in the documentation for the function, but a link
147
+ on that function name that simply reloads the section the user is already
148
+ reading is useless and distracting.
149
+
150
+ Do not use links in section headers. They distract from the title of the
151
+ section. The term will be mentioned in the paragraph text and can be linked
152
+ from there.
153
+
154
+ Sphinx provides ways to automatically add links to references, and a way to
155
+ suppress the link. Using roles like ``:func:`map` `` will link to the
156
+ documentation for ``map ``. You can suppress the link while keeping the
157
+ semantic presentation of the function name by adding an exclamation point
158
+ prefix: ``:func:`!map` ``.
159
+
132
160
Affirmative tone
133
161
================
134
162
0 commit comments