mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
[toctree] Adding warning type/subtype toc.no_title
(#12479)
Add warning type and subtype to warning generated in toctree
This commit is contained in:
parent
751e9162c0
commit
3b3a7d911b
@ -366,6 +366,7 @@ General configuration
|
||||
* ``toc.excluded``
|
||||
* ``toc.not_readable``
|
||||
* ``toc.secnum``
|
||||
* ``toc.no_title``
|
||||
|
||||
Extensions can also define their own warning types.
|
||||
Those defined by the first-party ``sphinx.ext`` extensions are:
|
||||
|
@ -316,7 +316,7 @@ def _toctree_entry(
|
||||
# empty toc means: no titles will show up in the toctree
|
||||
logger.warning(__('toctree contains reference to document %r that '
|
||||
"doesn't have a title: no link will be generated"),
|
||||
ref, location=toctreenode)
|
||||
ref, location=toctreenode, type='toc', subtype='no_title')
|
||||
except KeyError:
|
||||
# this is raised if the included file does not exist
|
||||
ref_path = env.doc2path(ref, False)
|
||||
|
Loading…
Reference in New Issue
Block a user