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: docs/docs/table-of-contents.md
+5-9Lines changed: 5 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,19 +10,15 @@ To add a TOC, create a file named `toc.yml`. Here's the structure for a simple Y
10
10
items:
11
11
- name: Tutorial
12
12
items:
13
-
- name: Introduction
14
-
href: tutorial.md
15
-
- name: Step 1
16
-
href: step-1.md
17
-
- name: Step 2
18
-
href: step-2.md
19
-
- name: Step 3
20
-
href: step-3.md
13
+
- href: tutorial.md
14
+
- href: step-1.md
15
+
- href: step-2.md
16
+
- href: step-3.md
21
17
```
22
18
23
19
The YAML document is a tree of TOC nodes, each of which has these properties:
24
20
25
-
- `name`: The display name for the TOC node.
21
+
- `name`: An optional display name for the TOC node. When not specified, uses the `title` metadata or the first Heading 1 element from the referenced article as the display name.
26
22
- `href`: The path the TOC node leads to. Optional because a node can exist just to parent other nodes.
27
23
- `items`: If a node has children, they're listed in the items array.
28
24
- `uid`: The uid of the article. Can be used instead of `href`.
0 commit comments