Skip to content

Commit

Permalink
Close sphinx-doc#9623: Allow to suppress warnings on excluded documen…
Browse files Browse the repository at this point in the history
…t found in toctree
  • Loading branch information
tk0miya committed Sep 12, 2021
1 parent 73a37e6 commit 3839e0d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGES
Expand Up @@ -13,6 +13,9 @@ Deprecated
Features added
--------------

* #9623: Allow to suppress "toctree contains reference to excluded document"
warnings using :confval:`suppress_warnings`

Bugs fixed
----------

Expand Down
1 change: 1 addition & 0 deletions doc/usage/configuration.rst
Expand Up @@ -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``
Expand Down
3 changes: 2 additions & 1 deletion sphinx/directives/other.py
Expand Up @@ -133,7 +133,8 @@ def parse_content(self, toctree: addnodes.toctree) -> List[Node]:
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:
Expand Down

0 comments on commit 3839e0d

Please sign in to comment.