Create sections for navigation menu#662
Conversation
This also moves the `pages` entries from the root `index.yaml` to the `index.yaml` of the versioned directories. This allows more control over the navigation menu (order of elements) Generated-By: Gemini 2.5 Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
|
conflicts |
Signed-off-by: Addisu Z. Taddese <addisuzt@intrinsic.ai>
…to README Generated-By: Gemini 3.0 Signed-off-by: Addisu Z. Taddese <addisuzt@intrinsic.ai>
Generated-By: Gemini 3.0 Signed-off-by: Addisu Z. Taddese <addisuzt@intrinsic.ai>
Generated-by: Gemini 3.0 Signed-off-by: Addisu Z. Taddese <addisuzt@intrinsic.ai>
|
This is ready for review |
| @@ -1,3 +1,5 @@ | |||
| # Gazebo Library How-To Guides | |||
There was a problem hiding this comment.
There seems to be now two top-level H1s in one document: Gazebo Library How-To Guides and Ignition Tutorials. I think this is inconsistent with the other distributions, where there's only one top-level section (except edifice, which has the same issue).
There was a problem hiding this comment.
Made all the library_howto files uinform and used a MyST substitution instead of hardcoding the version numbers in 27343d8
| @@ -1,3 +1,5 @@ | |||
| # Gazebo Library How-To Guides | |||
There was a problem hiding this comment.
There seems to be now two top-level H1s in one document: Gazebo Library How-To Guides and Ignition Tutorials. I think this is inconsistent with the other distributions, where there's only one top-level section (except dome, which has the same issue).
| title: Release process | ||
| file: common:release.md | ||
| description: Release process overview. | ||
| - name: releases-instructions |
There was a problem hiding this comment.
Replace it with release_instructions? The generated URL looks more consistent with the other and clear in singular.
There was a problem hiding this comment.
This would break the current URL though https://gazebosim.org/docs/jetty/releases-instructions/
| - name: tutorials | ||
| title: Simulation Tutorials | ||
| children: | ||
| - name: spawn_urdf |
There was a problem hiding this comment.
The order of this tutorial isn't consistent. Sometimes appear at the top and sometimes at the bottom. Should we move it to the bottom for consistency? Check other distributions too.
There was a problem hiding this comment.
The goal was to match the existing website. If you look at citadel/index.yaml in the main branch:
Lines 54 to 92 in b696405
spawn_urdf comes right after ros_integration and ros2_integration, which are now in the how-to. I opted to keep the order of the existing index.yaml wherever possible to keep changes to a minimum and to make it easier to review.
Signed-off-by: Addisu Z. Taddese <addisuzt@intrinsic.ai>
Use MyST substitutions populated from top-level index.yaml to ensure uniformity and correctness across releases. Generated-By: Gemini 3.0 Pro Signed-off-by: Addisu Z. Taddese <addisuzt@intrinsic.ai>
Signed-off-by: Addisu Z. Taddese <addisuzt@intrinsic.ai>
Added a comment pointing to README.md for more information about the documentation structure and build process. Generated-By: Gemini 3.0 Pro Signed-off-by: Addisu Z. Taddese <addisuzt@intrinsic.ai>
Signed-off-by: Addisu Z. Taddese <addisuzt@intrinsic.ai>
Extracted common navigation sections to shared files in common/ and supported !include in build script and conf.py. Made all versions uniform by creating library_howtos.md for older releases. Generated-By: Gemini 3.0 Pro Signed-off-by: Addisu Z. Taddese <addisuzt@intrinsic.ai>
Thanks for the suggestion. 2fe7ce3 extracts common navigation sections to shared files in common/ and uses |
caguero
left a comment
There was a problem hiding this comment.
Just a few minor comments.
| * **Users**: For those who primarily run Gazebo using standard tools (like `gz | ||
| sim`), edit SDFormat files, use existing plugins, and interact with running | ||
| simulations from the outside — typically by publishing and subscribing to | ||
| topics over Gazebo Transport or ROS." |
There was a problem hiding this comment.
Nit: Remove the traling quote (")?
| with open(version_tmp_dir / "index.yaml") as f: | ||
| version_nav_yaml = yaml.safe_load(f) | ||
| version_nav_yaml['pages'] = flatten_navigation(version_nav_yaml['pages']) | ||
| if not version_nav_yaml or not version_nav_yaml.get("pages"): |
There was a problem hiding this comment.
Should this entire check appear before the previous line where we index with pages?
| with open(map_path) as f: | ||
| source_manifest = json.load(f) | ||
|
|
||
| def yaml_include(loader, node): |
There was a problem hiding this comment.
This function seems duplicated as it already appeared in build_multiversion.py:29-37. Consider to refactor it.
|
|
||
| yaml.SafeLoader.add_constructor('!include', yaml_include) | ||
|
|
||
| def flatten_navigation(nav_items): |
There was a problem hiding this comment.
This function seems duplicated as it already appeared in build_multiversion.py:40-54. Consider to refactor it.
|
|
||
| # TODO(azeey) Document | ||
| if "file" in page: | ||
| file_path = page["file"].replace("common:", "") |
There was a problem hiding this comment.
Consider using .removeprefix instead of replace. I think we only want to replace a potential prefix.
| for page in nav_yaml_pages: | ||
| file_name_map[page["name"]] = f"{prefix}{page['file']}" | ||
| if "file" in page: | ||
| file_name_map[page["name"]] = page['file'].replace("common:", "") |
There was a problem hiding this comment.
Consider using .removeprefix instead of replace. I think we only want to replace a potential prefix.
🎉 New feature
Summary
Currently, the navigation menu on gazebosim.org/docs is a flat list and can be difficult to navigate. There also no clear organization between items that are tutorials vs how-to guildes vs reference, etc. This PR organizes the documents based on the diataxis framework.
To make all of this possible, the build script had to be modifed.
index.yamlfiles in the versioned directories (e.g.jetty/index.yaml). The top level index.yaml no longer containspages. This allows for more control over the order of items and organizing them into different sections.commondirectory. This is to make it explicit in theindex.yamlfiles where these files are coming from. Otherwise, there it would be confusing since the common files are no longer peers of the index.yaml files that reference them. When referencing these files inindex.yaml, the prefixcommon:has to be used now.TODO
jetty(so, onlybuild_multiversion.py -r jettyworks right now)Preview
Checklist
Generated-by: Gemini 2.5
Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining
Signed-off-byandGenerated-bymessages.