diff options
author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2021-09-12 19:18:21 +0900 |
---|---|---|
committer | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2021-09-12 19:23:19 +0900 |
commit | ca146ac18be3fdb9108b8d9dcb0b165ee62e56df (patch) | |
tree | fd8398253f12051fcd13b06f1c4978e0079ea362 | |
parent | 5c4f741fffa0d698e82d31b3dd76c34982d313b5 (diff) | |
download | sphinx-git-ca146ac18be3fdb9108b8d9dcb0b165ee62e56df.tar.gz |
Close #9623: Allow to suppress warnings on excluded document found in toctree
-rw-r--r-- | CHANGES | 3 | ||||
-rw-r--r-- | doc/usage/configuration.rst | 1 | ||||
-rw-r--r-- | sphinx/directives/other.py | 3 |
3 files changed, 6 insertions, 1 deletions
@@ -13,6 +13,9 @@ Deprecated Features added -------------- +* #9623: Allow to suppress "toctree contains reference to excluded document" + warnings using :confval:`suppress_warnings` + Bugs fixed ---------- diff --git a/doc/usage/configuration.rst b/doc/usage/configuration.rst index a6607e57e..dba3cc831 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.not_readable`` * ``toc.secnum`` * ``epub.unknown_project_files`` * ``epub.duplicated_toc_entry`` diff --git a/sphinx/directives/other.py b/sphinx/directives/other.py index f04526f93..7e5b341f0 100644 --- a/sphinx/directives/other.py +++ b/sphinx/directives/other.py @@ -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: |