diff --git a/doc/usage/configuration.rst b/doc/usage/configuration.rst index 795dc42b1..70dffafdd 100644 --- a/doc/usage/configuration.rst +++ b/doc/usage/configuration.rst @@ -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: diff --git a/sphinx/environment/adapters/toctree.py b/sphinx/environment/adapters/toctree.py index cfe717f65..42c0bb495 100644 --- a/sphinx/environment/adapters/toctree.py +++ b/sphinx/environment/adapters/toctree.py @@ -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)