Sphinx multi toctree hierarchy of sub sub pages

68 Views Asked by At

I have the following page structure:

index.md
a/a.md
a/a/a.md

I am using a here for simplifying the example. I get a "duplicated label" warning now. This happens also, when renaming.

index.md has the following content:

# namespace/project-name

## Table of Contents
```{toctree}

a/a
```

a/a.md has the following content:

```{toctree}

a/a
```

Once I do an html build with Sphinx, I get:
a1 is a/a/a.md and a2 is a/a.md

I wish for a1 being grouped underneath a2: a > a

How can I achieve this?

Additional info:

  • This is not a problem with MyST-parser, because this also happens with reST for me.
  • I tried setting :maxdepth: X in various permutations, but the option didn't change the Table of Contents output. Maybe, I am using the option wrong?
0

There are 0 best solutions below