Replies: 2 comments 2 replies
-
Q: What are your thoughts on creating a toc.yml for every folder? When I saw the top-level toc defintion, I thought it looked really easy and that every folder could benefit from it. |
Beta Was this translation helpful? Give feedback.
-
My two cents is this is fine as long as (1) we're very clear in the contributor guidelines about how that first file gets moved up to be the nav page for that folder (which I think is how docsmobile worked too, so internal folks should be used to it), and (2) we don't let the nested folders ill-affect our slugs.
We kind of did this in the kibana repo (i.e. branches of the tree are defined in many separate folders). I found it a little confusing sometimes remembering how to ensure branches got picked up (it felt like you had to kind of hop backwards through the nested folders to see how/where it was being included). So if that proposal goes ahead we'd again need to be very clear for all our contributors about how to ensure all the branches are grafted to the trunk of the tree. |
Beta Was this translation helpful? Give feedback.
-
Our current post-migration script puts everything in file blocks with children:
I think it be better if we prefer folder directives in the toc.yml.
This will make it a lot easier to manually rename/move folders. It will also greatly help us in engineering to create refactor tools later down the line.
There are also some folders that contain a flat list of files but that get projected into complex navigation structures:
See: https://github.com/elastic/asciidocalypse/tree/add-docs-content/docs/docs-content/docs/solutions/observability/apps
and its TOC:
https://github.com/elastic/asciidocalypse/blob/add-docs-content/docs/docs-content/docs/solutions/toc.yml#L17C7-L83
I personally find these very hard to navigate and would prefer more deeply nested folders grouping things logically in folders to match their logical grouping in the TOC.
Instead of creating these groupings using file names folders work better:
Beta Was this translation helpful? Give feedback.
All reactions