diff --git a/CHANGES b/CHANGES index 20ac78fa6..863a5ea24 100644 --- a/CHANGES +++ b/CHANGES @@ -14,6 +14,8 @@ Features added -------------- * LaTeX: Make the ``toplevel_sectioning`` setting optional in LaTeX theme +* #7410: Allow to suppress "circular toctree references detected" warnings using + :confval:`suppress_warnings` Bugs fixed ---------- diff --git a/doc/usage/configuration.rst b/doc/usage/configuration.rst index 42e517ea7..cc31f084f 100644 --- a/doc/usage/configuration.rst +++ b/doc/usage/configuration.rst @@ -313,6 +313,7 @@ General configuration * ``ref.doc`` * ``ref.python`` * ``misc.highlighting_failure`` + * ``toc.circular`` * ``toc.secnum`` * ``epub.unknown_project_files`` * ``autosectionlabel.*`` diff --git a/sphinx/environment/adapters/toctree.py b/sphinx/environment/adapters/toctree.py index bd3abd9ed..9a1ef73d4 100644 --- a/sphinx/environment/adapters/toctree.py +++ b/sphinx/environment/adapters/toctree.py @@ -153,7 +153,7 @@ class TocTree: logger.warning(__('circular toctree references ' 'detected, ignoring: %s <- %s'), ref, ' <- '.join(parents), - location=ref) + location=ref, type='toc', subtype='circular') continue refdoc = ref toc = self.env.tocs[ref].deepcopy()