-
-
Notifications
You must be signed in to change notification settings - Fork 16
Open
Labels
Description
Summary
Guides does not support adding a document to 2 different parents in the toctree. This is supported by Sphinx.
Although probably not relevant, the warnings that are issued create a lot of noise when building the Symfony docs: https://github.com/wouterj/symfony-docs-guides/actions/runs/19391242509/job/55484996045
Code snippet that reproduces the problem
Create a small doc with a toctree like this:
index.rst
├─ design.rst
├─ implementation.rst
│ ├─ design.rst
│ └─ test.rst
└─ release.rst
Rst files
.. index.rst
Homepage
========
.. toctree::
design
implementation
release.. implementation.rst
Implementation
==============
.. toctree::
design
testdesign.rst, release.rst and test.rst are empty
The design.rst now has both Index and Implementation as parents.
This triggers a warning with Guides:
app.WARNING: Document design has been added to parents index and implementation. The `toctree`
directive changes the position of documents in the document tree. Use the `menu` directive to
only display a menu without changing the document tree.
Expected output
Sphinx accepts the doc structure, and generates a toctree order like this:
- index
- design
- implementation
- test
- release