File tree Expand file tree Collapse file tree 3 files changed +9
-6
lines changed
Expand file tree Collapse file tree 3 files changed +9
-6
lines changed Original file line number Diff line number Diff line change 33from urllib .request import urlopen
44
55extensions = [
6+ 'linklint.ext' ,
67 'notfound.extension' ,
78 'sphinx.ext.extlinks' ,
89 'sphinx.ext.intersphinx' ,
Original file line number Diff line number Diff line change @@ -193,18 +193,19 @@ the second mention is more appropriate for a link. Some units are long enough
193193to have a few repeated links. Use judgement to decide when a link will help
194194the reader.
195195
196- Do not use a link when the link would point to the current unit. It's natural
197- to use the name of a function in the documentation for the function, but a link
198- on that function name that simply reloads the section the user is already
199- reading is useless and distracting .
196+ We use the :pypi: ` linklint Sphinx extension <linklint> ` to suppress two kinds
197+ of excessive links: references in a section to itself and duplicate references
198+ in a paragraph. Previously, editors had to carefully use an exclamation mark
199+ in a Sphinx reference (`` :func:`!map` ``) to prevent such links .
200200
201201Do not use links in section headers. They distract from the title of the
202202section. The term will be mentioned in the paragraph text and can be linked
203203from there.
204204
205- Sphinx provides ways to automatically add links to references, and a way to
205+ Sphinx automatically adds links to references, and provides a way to
206206suppress the link. Using roles like ``:func:`map` `` will link to the
207- documentation for ``map ``. You can suppress the link while keeping the
207+ documentation for ``map ``. If automatic link suppression isn't enough,
208+ you can suppress the link while keeping the
208209semantic presentation of the function name by adding an exclamation point
209210prefix: ``:func:`!map` ``. See :ref: `roles ` for more details.
210211
Original file line number Diff line number Diff line change 11furo >= 2022.6.4
22jinja2
3+ linklint
34sphinx-autobuild >= 2024.9.19
45sphinx-inline-tabs >= 2023.4.21
56sphinx-lint == 1.0.2
You can’t perform that action at this time.
0 commit comments