[docs] Add examples.yml header instructions#64237
Conversation
There was a problem hiding this comment.
Code Review
This pull request adds header comments to several YAML configuration files (examples.yml for data, serve, and train) to guide developers on how the Examples Gallery pages are auto-generated and referenced. The reviewer points out that hardcoding .html extensions in the reference instructions is a Sphinx anti-pattern, and recommends using the :doc: role instead to ensure proper link validation and compatibility with other builders.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| # This file is used to auto-generate the Examples Gallery page. | ||
| # Do not edit the generated examples.rst page directly. | ||
| # To request formatting changes to the generated page, file an issue with the Ray docs team. | ||
| # To reference the generated page, use examples.html. |
There was a problem hiding this comment.
In Sphinx, referencing other documentation pages should be done using the :doc: role (e.g., :doc:/data/examples) rather than hardcoding the .html extension.
Hardcoding .html links is an anti-pattern in Sphinx because:
- It bypasses Sphinx's link validation (Sphinx won't warn you if the target file is moved or deleted).
- It can break if the documentation is built using a non-HTML builder (like PDF or EPUB).
Consider updating this instruction to recommend the :doc: role:
To reference the generated page, use :doc:/data/examples.
| # This file is used to auto-generate the Examples Gallery page. | ||
| # Do not edit the generated examples.rst page directly. | ||
| # To request formatting changes to the generated page, file an issue with the Ray docs team. | ||
| # To reference the generated page, use examples.html. |
There was a problem hiding this comment.
In Sphinx, referencing other documentation pages should be done using the :doc: role (e.g., :doc:/serve/examples) rather than hardcoding the .html extension.
Hardcoding .html links is an anti-pattern in Sphinx because:
- It bypasses Sphinx's link validation (Sphinx won't warn you if the target file is moved or deleted).
- It can break if the documentation is built using a non-HTML builder (like PDF or EPUB).
Consider updating this instruction to recommend the :doc: role:
To reference the generated page, use :doc:/serve/examples.
| # This file is used to auto-generate the Examples Gallery page. | ||
| # Do not edit the generated examples.rst page directly. | ||
| # To request formatting changes to the generated page, file an issue with the Ray docs team. | ||
| # To reference the generated page, use examples.html. |
There was a problem hiding this comment.
In Sphinx, referencing other documentation pages should be done using the :doc: role (e.g., :doc:/train/examples) rather than hardcoding the .html extension.
Hardcoding .html links is an anti-pattern in Sphinx because:
- It bypasses Sphinx's link validation (Sphinx won't warn you if the target file is moved or deleted).
- It can break if the documentation is built using a non-HTML builder (like PDF or EPUB).
Consider updating this instruction to recommend the :doc: role:
To reference the generated page, use :doc:/train/examples.
5743848 to
f127a59
Compare
Signed-off-by: Linh Le <185214389+linh285@users.noreply.github.com>
f127a59 to
cf7bc5b
Compare
Description
This PR closes #44388 by adding header comments to the
examples.ymlfiles used to generate the Examples Gallery pages.The comments clarify that:
examples.rstpages should not be edited directly;examples.html;Related issues
Closes #44388
Additional information
This is a docs-only change. No runtime code was modified.
Checks:
examples.ymlfiles were changed.git diff --check.