diff options
author | Abhijeet <abhijeetviswa@gmail.com> | 2020-01-29 13:34:14 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-29 14:34:14 +0100 |
commit | 1a9459b88e4b07b3f4dd80ed5987e13111afe1c2 (patch) | |
tree | 407c98487cf5e2ab3e9e7216886cef9c6f157dd7 /docs/conf.py | |
parent | b7a3a6c9ef0a89625881b47594120bca55fa2e49 (diff) | |
download | django-1a9459b88e4b07b3f4dd80ed5987e13111afe1c2.tar.gz |
Fixed #28290 -- Enabled Sphinx auto-label generation for title and section headers.
Diffstat (limited to 'docs/conf.py')
-rw-r--r-- | docs/conf.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/docs/conf.py b/docs/conf.py index cd2f2f3809..fceba45af3 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -41,8 +41,15 @@ extensions = [ 'sphinx.ext.extlinks', "sphinx.ext.intersphinx", "sphinx.ext.viewcode", + "sphinx.ext.autosectionlabel", ] +# AutosectionLabel settings. +# Uses a <page>:<label> schema which doesn't work for duplicate sub-section +# labels, so set max depth. +autosectionlabel_prefix_document = True +autosectionlabel_maxdepth = 2 + # Spelling check needs an additional module that is not installed by default. # Add it only if spelling check is requested so docs can be generated without it. if 'spelling' in sys.argv: |