Close #9623: Allow to suppress warnings on excluded document found in toctree

This commit is contained in:
Takeshi KOMIYA 2021-09-12 19:18:21 +09:00
parent 5c4f741fff
commit ca146ac18b
3 changed files with 6 additions and 1 deletions

View File

@ -13,6 +13,9 @@ Deprecated
Features added
--------------
* #9623: Allow to suppress "toctree contains reference to excluded document"
warnings using :confval:`suppress_warnings`
Bugs fixed
----------

View File

@ -329,6 +329,7 @@ General configuration
* ``ref.python``
* ``misc.highlighting_failure``
* ``toc.circular``
* ``toc.not_readable``
* ``toc.secnum``
* ``epub.unknown_project_files``
* ``epub.duplicated_toc_entry``

View File

@ -132,7 +132,8 @@ class TocTree(SphinxDirective):
else:
message = __('toctree contains reference to nonexisting document %r')
logger.warning(message, docname, location=toctree)
logger.warning(message, docname, type='toc', subtype='not_readable',
location=toctree)
self.env.note_reread()
else:
if docname in all_docnames: