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/building-blocks/index.md
+67-5Lines changed: 67 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -49,17 +49,79 @@ Links from other documentation sets to yours. Validated to prevent breaking chan
49
49
### Documentation Set Navigation
50
50
51
51
A documentation set is responsible for defining how files are organized in the navigation. This is done by defining a `toc` section in the `docset.yml` file.
52
-
If the `toc` section becomes to big folders can define a dedicated `toc.yml` file to organize the files and link them in their parent `toc.yml` or `docset.yml` file.
52
+
53
+
```yaml
54
+
toc:
55
+
- file: index.md
56
+
- folder: contribute
57
+
children:
58
+
- file: index.md
59
+
- file: locally.md
60
+
children:
61
+
- file: page.md
62
+
```
63
+
64
+
If the `toc` section becomes too unwieldy folders can define a dedicated `toc.yml` file to organize their files and link them in their parent `toc.yml` or `docset.yml` file.
65
+
66
+
```yaml
67
+
toc:
68
+
- file: index.md
69
+
- folder: contribute
70
+
children:
71
+
- file: index.md
72
+
- file: locally.md
73
+
children:
74
+
- file: page.md
75
+
- toc: development
76
+
```
77
+
78
+
Where `development/toc.yml` is defined as:
79
+
80
+
```yaml
81
+
toc:
82
+
- file: index.md
83
+
- toc: link-validation
84
+
```
85
+
86
+
:::{note}
87
+
The folder name `development` is not repeated in the `toc.yml` file this allows for easier renames of the folder itself.
88
+
:::
53
89
54
90
Read more details in the reference for [docset.yml](../configure/content-set/index.md)
55
91
56
92
### Global Navigation
57
93
58
-
The global navigation is defined in the [`navigation.yml`](../configure/site/navigation.md) file.
59
-
This navigation only concerns itself with `toc` sections defined in either `docset.yml` or `toc.yml` files.
60
-
These `toc` sections can be reorganized independently of their position in the documentation set navigation.
94
+
The global navigation is defined in the [`navigation.yml`](../configure/site/navigation.md) file. It follows a very similar
95
+
`toc`configuration structure to the documentation set navigation.
96
+
97
+
It comes, however, with the following restrictions:
98
+
99
+
* It may only link to `toc.yml` or `docset.yml` files
100
+
101
+
```yaml
102
+
toc:
103
+
- toc: get-started
104
+
- toc: elasticsearch-net://
105
+
- toc: extend
106
+
children:
107
+
- toc: kibana://extend
108
+
path_prefix: extend/kibana
109
+
- toc: logstash://extend
110
+
path_prefix: extend/logstash
111
+
- toc: beats://extend
112
+
```
113
+
114
+
Some syntactic notes:
115
+
116
+
* The toc uses a similar [cross-link syntax to links](../syntax/links.md)
117
+
* The `./docset.yml` or `/toc.yml` suffix is implied, assembler will find the correct file for you.
118
+
* The narrative repository `elastic/docs-content` is 'special' so omitting `scheme://` implies `docs-content://`.
119
+
120
+
These `toc` sections can be reorganized independently of their position in their origin documentation set navigation.
121
+
This allows sections from different repositories to be grouped together in the global navigation.
61
122
62
-
Dangling `toc` sections are **not** allowed and the assembler build will report an error if it finds any. All `toc` sections must be linked in `navigation.yml`.
123
+
All `toc` sections must be linked in `navigation.yml`.
124
+
Dangling `toc` sections are **not** allowed and the assembler build will report an error if it finds any.
63
125
64
126
Read more details in the reference for [navigation.yml](../configure/site/navigation.md)
0 commit comments