Skip to content

Commit 9a9f20b

Browse files
committed
update building blocks
1 parent 6d7f430 commit 9a9f20b

File tree

1 file changed

+67
-5
lines changed

1 file changed

+67
-5
lines changed

docs/building-blocks/index.md

Lines changed: 67 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,17 +49,79 @@ Links from other documentation sets to yours. Validated to prevent breaking chan
4949
### Documentation Set Navigation
5050

5151
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+
:::
5389

5490
Read more details in the reference for [docset.yml](../configure/content-set/index.md)
5591

5692
### Global Navigation
5793

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.
61122

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.
63125

64126
Read more details in the reference for [navigation.yml](../configure/site/navigation.md)
65127

0 commit comments

Comments
 (0)