Minor cleanup to autosectionlabel docs (#12992)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
This commit is contained in:
Tim Hoffmann
2024-10-10 17:23:54 +02:00
committed by GitHub
parent 566d1cd20f
commit 283d863af1

View File

@@ -1,15 +1,15 @@
.. highlight:: rst
:mod:`sphinx.ext.autosectionlabel` -- Allow reference sections using its title
==============================================================================
:mod:`sphinx.ext.autosectionlabel` -- Allow referencing sections by their title
===============================================================================
.. module:: sphinx.ext.autosectionlabel
:synopsis: Allow reference section its title.
:synopsis: Allow referencing sections by their title.
.. versionadded:: 1.4
This extension allows you to refer sections its title. This affects to the
reference role (:rst:role:`ref`).
By default, cross-references to sections use labels (see :rst:role:`ref`).
This extension allows you to instead refer to sections by their title.
For example::
@@ -32,6 +32,8 @@ Configuration
-------------
.. confval:: autosectionlabel_prefix_document
:type: :code-py:`bool`
:default: :code-py:`False`
True to prefix each section label with the name of the document it is in,
followed by a colon. For example, ``index:Introduction`` for a section
@@ -40,11 +42,13 @@ Configuration
documents.
.. confval:: autosectionlabel_maxdepth
:type: :code-py:`int | None`
:default: :code-py:`None`
If set, autosectionlabel chooses the sections for labeling by its depth. For
example, when set 1 to ``autosectionlabel_maxdepth``, labels are generated
only for top level sections, and deeper sections are not labeled. It
defaults to ``None`` (disabled).
defaults to ``None`` (i.e. all sections are labeled).
Debugging