diff options
-rw-r--r-- | doc/usage/configuration.rst | 5 | ||||
-rw-r--r-- | sphinx/directives/other.py | 4 |
2 files changed, 8 insertions, 1 deletions
diff --git a/doc/usage/configuration.rst b/doc/usage/configuration.rst index dba3cc831..395708b57 100644 --- a/doc/usage/configuration.rst +++ b/doc/usage/configuration.rst @@ -329,6 +329,7 @@ General configuration * ``ref.python`` * ``misc.highlighting_failure`` * ``toc.circular`` + * ``toc.excluded`` * ``toc.not_readable`` * ``toc.secnum`` * ``epub.unknown_project_files`` @@ -361,6 +362,10 @@ General configuration Added ``epub.duplicated_toc_entry`` + .. versionchanged:: 4.3 + + Added ``toc.excluded`` and ``toc.not_readable`` + .. confval:: needs_sphinx If set to a ``major.minor`` version string like ``'1.1'``, Sphinx will diff --git a/sphinx/directives/other.py b/sphinx/directives/other.py index 7e5b341f0..03eb6d3d2 100644 --- a/sphinx/directives/other.py +++ b/sphinx/directives/other.py @@ -129,10 +129,12 @@ class TocTree(SphinxDirective): elif docname not in self.env.found_docs: if excluded(self.env.doc2path(docname, None)): message = __('toctree contains reference to excluded document %r') + subtype = 'excluded' else: message = __('toctree contains reference to nonexisting document %r') + subtype = 'not_readable' - logger.warning(message, docname, type='toc', subtype='not_readable', + logger.warning(message, docname, type='toc', subtype=subtype, location=toctree) self.env.note_reread() else: |