mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Minor cleanup to autosectionlabel docs (#12992)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user