Skip to content

[docs] Add examples.yml header instructions#64237

Open
linh285 wants to merge 1 commit into
ray-project:masterfrom
linh285:docs-add-examples-yml-headers
Open

[docs] Add examples.yml header instructions#64237
linh285 wants to merge 1 commit into
ray-project:masterfrom
linh285:docs-add-examples-yml-headers

Conversation

@linh285

@linh285 linh285 commented Jun 20, 2026

Copy link
Copy Markdown

Description

This PR closes #44388 by adding header comments to the examples.yml files used to generate the Examples Gallery pages.

The comments clarify that:

  • the generated examples.rst pages should not be edited directly;
  • formatting changes to the generated pages should be requested through a docs issue;
  • generated pages should be referenced with examples.html;
  • new examples should include skill level and framework information when applicable.

Related issues

Closes #44388

Additional information

This is a docs-only change. No runtime code was modified.

Checks:

  • Verified that only the three requested examples.yml files were changed.
  • Ran git diff --check.
  • Checked the files with PyYAML.

@linh285 linh285 requested review from a team as code owners June 20, 2026 18:49

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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:

  1. It bypasses Sphinx's link validation (Sphinx won't warn you if the target file is moved or deleted).
  2. 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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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:

  1. It bypasses Sphinx's link validation (Sphinx won't warn you if the target file is moved or deleted).
  2. 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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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:

  1. It bypasses Sphinx's link validation (Sphinx won't warn you if the target file is moved or deleted).
  2. 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.

@linh285 linh285 force-pushed the docs-add-examples-yml-headers branch from 5743848 to f127a59 Compare June 20, 2026 18:53
Signed-off-by: Linh Le <185214389+linh285@users.noreply.github.com>
@linh285 linh285 force-pushed the docs-add-examples-yml-headers branch from f127a59 to cf7bc5b Compare June 20, 2026 19:05
@ray-gardener ray-gardener Bot added docs An issue or change related to documentation core Issues that should be addressed in Ray Core community-contribution Contributed by the community labels Jun 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community-contribution Contributed by the community core Issues that should be addressed in Ray Core docs An issue or change related to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[docs] Add documentation to the examples.yml file headers

1 participant