[all-commits] [llvm/llvm-project] 035119: [docs] Enforce unambiguous toctree in llvm/docs (#...

Scott Linder via All-commits all-commits at lists.llvm.org
Thu Jun 25 08:22:08 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 03511907c7a9908f7902e18d3789371a63bb91b1
      https://github.com/llvm/llvm-project/commit/03511907c7a9908f7902e18d3789371a63bb91b1
  Author: Scott Linder <scott.linder at amd.com>
  Date:   2026-06-25 (Thu, 25 Jun 2026)

  Changed paths:
    M llvm/docs/CommandGuide/index.md
    M llvm/docs/GettingInvolved.md
    M llvm/docs/GlobalISel/Pipeline.rst
    M llvm/docs/GlobalISel/Porting.rst
    M llvm/docs/GlobalISel/index.rst
    M llvm/docs/Reference.md
    M llvm/docs/UserGuides.md
    M llvm/docs/conf.py
    M llvm/docs/tutorial/MyFirstLanguageFrontend/index.rst
    M llvm/tools/llvm-debuginfo-analyzer/README.md
    A utils/docs/llvm_sphinx/ext/checks.py

  Log Message:
  -----------
  [docs] Enforce unambiguous toctree in llvm/docs (#203967)

It seems like using a non-`hidden` `toctree` for page navigation is a
bit of a trap, in that every doc must have a single unique path through
the global toctree to the root doc, and it is very easy to end up with
multiple.

This patch tries to address the warnings (actually infos, hence why it
does not fail the build) in llvm/docs/.

I tried to preserve the documents as-is, by hiding `toctree`s and
instead using lists of `{doc}` forms where the `toctree` was visible
before.

The only visual change in the resulting HTML is that the link is now
underlined where it wasn't before.

I also nested the `Tutorials` section in GISel Porting document, and
didn't link to it directly as the title is a bit ambiguous without the
context of the document it appears in.

I also saw warnings about a jump in heading level in
`llvm-debuginfo-analyzer/README.md` and assumed it was just a mistake,
so I collapsed the level-3 headings down to level-2.

Finally, I wrote a sphinx extension to make ambiguous toctree entries
into errors, so the docs do not regress. I hope to fix other sphinx
project in llvm-project and enable the checks for them too, assuming
this patch is accepted.

Change-Id: Icb11de69be1ea5489fba501aee4d767f5129e7e1



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list