You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+13-9Lines changed: 13 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,8 +10,6 @@ In normal Sphinx documentation, the documentation structure is defined *via* a b
10
10
11
11
This extension facilitates a **top-down** approach to defining the Table of Contents (ToC) structure, within a single file that is external to the documentation.
12
12
13
-
The path to the toc file can be defined with `external_toc_path` (default: `_toc.yml`).
The value of the `file` key will be a path to a file (relative to the `conf.py`) with or without the file extension.
36
34
37
-
```{important}
35
+
:::{important}
38
36
Each document file can only occur once in the ToC!
39
-
```
37
+
:::
40
38
41
39
Document files can then have a `parts` key - denoting a list of individual toctrees for that document - and in-turn each part should have a `sections` key - denoting a list of children links, that are one of: `file`, `url` or `glob`:
42
40
@@ -59,6 +57,9 @@ main:
59
57
- glob: other*
60
58
```
61
59
60
+
This is equivalent to having a single `toctree` directive in `intro`, containing `doc1`,
61
+
and a single `toctree` directive in `doc1`, with the `:glob:` flag and containing `doc2`, `https://example.com` and `other*`.
62
+
62
63
As a shorthand, the `sections` key can be at the same level as the `file`, which denotes a document with a single `part`.
63
64
For example, this file is exactly equivalent to the one above:
64
65
@@ -142,15 +143,19 @@ To build a template site from only a ToC file:
0 commit comments