Fix generated docs see also links#6355
Conversation
Generate operator `See also entries` with Sphinx doc references instead of raw root-relative HTML links. The root-relative form resolves outside the DALI docs tree on docs.nvidia.com, so links from generated operator pages can point at dead /examples/... URLs. Let Sphinx resolve the target document from the generated page location so the resulting href stays within the deployed user guide for both pipeline and dynamic operation pages. Signed-off-by: Janusz Lisiecki <jlisiecki@nvidia.com>
f397f06 to
3e3c16e
Compare
|
!build |
|
CI MESSAGE: [51797027]: BUILD STARTED |
|
| Filename | Overview |
|---|---|
| docs/autodoc_submodules.py | Switches See-also links from root-relative HTML anchors to Sphinx :doc: cross-references; removesuffix(".html") is safe because _collect_references always produces .html paths via with_suffix. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A["doc_index.document_examples(examples/index.py)"] --> B["_collect_references\nurl = base_path/entry.html"]
B --> C["references dict\n{fn.resize: [(desc, examples/.../page.html)]}"]
C --> D["get_references(name, references)"]
D --> E["url.removesuffix('.html')\n-> examples/.../page"]
E --> F["emit :doc:`desc </examples/.../page>`"]
F --> G["Sphinx resolves to relative link\nwithin deployed docs tree"]
style G fill:#90EE90
Reviews (1): Last reviewed commit: "Fix generated docs see also links" | Re-trigger Greptile
|
CI MESSAGE: [51797027]: BUILD FAILED |
|
CI MESSAGE: [51797027]: BUILD PASSED |
see also links
Generate operator `See also entries` with Sphinx doc references instead of raw root-relative HTML links. The root-relative form resolves outside the DALI docs tree on docs.nvidia.com, so links from generated operator pages can point at dead /examples/... URLs. Let Sphinx resolve the target document from the generated page location so the resulting href stays within the deployed user guide for both pipeline and dynamic operation pages. Signed-off-by: Janusz Lisiecki <jlisiecki@nvidia.com>
Generate operator `See also entries` with Sphinx doc references instead of raw root-relative HTML links. The root-relative form resolves outside the DALI docs tree on docs.nvidia.com, so links from generated operator pages can point at dead /examples/... URLs. Let Sphinx resolve the target document from the generated page location so the resulting href stays within the deployed user guide for both pipeline and dynamic operation pages. Signed-off-by: Janusz Lisiecki <jlisiecki@nvidia.com>
Generate operator `See also entries` with Sphinx doc references instead of raw root-relative HTML links. The root-relative form resolves outside the DALI docs tree on docs.nvidia.com, so links from generated operator pages can point at dead /examples/... URLs. Let Sphinx resolve the target document from the generated page location so the resulting href stays within the deployed user guide for both pipeline and dynamic operation pages. Signed-off-by: Janusz Lisiecki <jlisiecki@nvidia.com>
Generate operator `See also entries` with Sphinx doc references instead of raw root-relative HTML links. The root-relative form resolves outside the DALI docs tree on docs.nvidia.com, so links from generated operator pages can point at dead /examples/... URLs. Let Sphinx resolve the target document from the generated page location so the resulting href stays within the deployed user guide for both pipeline and dynamic operation pages. Signed-off-by: Janusz Lisiecki <jlisiecki@nvidia.com>
Generate operator
See also entrieswith Sphinx doc references instead ofraw root-relative HTML links. The root-relative form resolves outside the
DALI docs tree on docs.nvidia.com, so links from generated operator pages
can point at dead /examples/... URLs.
Let Sphinx resolve the target document from the generated page location so
the resulting href stays within the deployed user guide for both pipeline
and dynamic operation pages.
Category:
Bug fix (non-breaking change which fixes an issue)
Description:
Fix generated operator documentation links in See also sections.
PR #6140 changed the generated references from relative links to
root-relative HTML links such as
/examples/.... On docs.nvidia.com theseresolve outside the DALI user guide tree, making links at the bottom of
operator pages dead.
This change emits
:doc:references to the target documents instead. Sphinxthen resolves the correct relative link from each generated operator page.
Additional information:
Affected modules and functionalities:
Generated operator documentation pages that include See also links to
examples.
Key points relevant for the review:
The important bit is that the generated RST now points at Sphinx documents
instead of raw root-relative HTML paths. This keeps the deployed links inside
the active DALI documentation tree.
Tests:
Checklist
Documentation
DALI team only
Requirements
REQ IDs: N/A
JIRA TASK: DALI-4707