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