Skip to content

Fix docs version selector paths for DALI 2.x#6354

Merged
JanuszL merged 1 commit into
NVIDIA:mainfrom
JanuszL:fix_selector_2+
May 22, 2026
Merged

Fix docs version selector paths for DALI 2.x#6354
JanuszL merged 1 commit into
NVIDIA:mainfrom
JanuszL:fix_selector_2+

Conversation

@JanuszL
Copy link
Copy Markdown
Contributor

@JanuszL JanuszL commented May 18, 2026

Category:

Other (Documentation)

Description:

It fixes the docs version selector for DALI 2.x generated entries. Those
entries were not marked as short user-guide links, which made the selector add
an unnecessary docs/ path component.

The generated DALI 2.x entries now use the existing short_user path mode so
the selector builds links that match the published layout.

Additional information:

Affected modules and functionalities:

Docs configuration for the version selector in docs/conf.py.

Key points relevant for the review:

The generated version entries for the current major release now include the
path mode expected by the selector link-generation logic.

Tests:

  • Existing tests apply
  • New tests added
    • Python tests
    • GTests
    • Benchmark
    • Other
  • N/A

Checklist

Documentation

  • Existing documentation applies
  • Documentation updated
    • Docstring
    • Doxygen
    • RST
    • Jupyter
    • Other
  • N/A

DALI team only

Requirements

  • Implements new requirements
  • Affects existing requirements
  • N/A

REQ IDs: N/A

JIRA TASK: N/A

The docs version selector generated legacy-version entries without marking them
as short user-guide links. For DALI 2.x pages, that made the selector add an
unnecessary `docs/` path component.

Mark generated DALI 2.x entries with the existing `short_user` path mode so
the selector builds links that match the published layout.

Signed-off-by: Janusz Lisiecki <jlisiecki@nvidia.com>
@JanuszL
Copy link
Copy Markdown
Contributor Author

JanuszL commented May 18, 2026

!build

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented May 18, 2026

Greptile Summary

This PR fixes the documentation version selector for DALI 2.x entries in docs/conf.py. Without the path mode tag, the switcher's fallback branch was appending /user-guide/docs/ to each 2.x archive URL instead of the correct /user-guide/ used for recent 1.x releases.

  • Adds "short_user" as the third element to each DALI 2.x versions tuple, making the URL-generation logic use the same branch already used for DALI 1.34+.
  • No functional code is changed; only the switcher JSON generation is affected.

Confidence Score: 5/5

Safe to merge — the change is a single-line addition of a path mode string to the DALI 2.x version loop, with no impact on runtime code.

The change is confined to switcher JSON generation in docs/conf.py. It aligns the DALI 2.x entries with the same "short_user" mode already used for DALI 1.34+, fixing broken archive links. No logic paths, data structures, or build steps are affected beyond the generated switcher.json file.

No files require special attention.

Important Files Changed

Filename Overview
docs/conf.py Adds "short_user" path mode to DALI 2.x version entries so the switcher generates /user-guide/ URLs instead of /user-guide/docs/, matching the published archive layout for these versions

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A["versions tuple\n(version, archive, mode?)"] --> B{mode present?}
    B -- "mode == 'devel'" --> C["/archives/{archive}/dali-developer-guide/docs/"]
    B -- "mode == 'short_devel'" --> D["/archives/{archive}/dali-developer-guide/"]
    B -- "mode == 'short_user'" --> E["/archives/{archive}/user-guide/"]
    B -- "no mode (else)" --> F["/archives/{archive}/user-guide/docs/"]
    G["DALI 2.x entries\n(before fix)"] -- "no mode → else branch" --> F
    H["DALI 2.x entries\n(after fix)"] -- "short_user" --> E
    I["DALI 1.34+ entries\n(existing)"] -- "short_user" --> E
Loading

Reviews (1): Last reviewed commit: "Fix docs version selector paths for DALI..." | Re-trigger Greptile

@dali-automaton
Copy link
Copy Markdown
Collaborator

CI MESSAGE: [51728812]: BUILD STARTED

@dali-automaton
Copy link
Copy Markdown
Collaborator

CI MESSAGE: [51728812]: BUILD PASSED

@JanuszL JanuszL merged commit 9c5cf57 into NVIDIA:main May 22, 2026
7 checks passed
@JanuszL JanuszL deleted the fix_selector_2+ branch May 22, 2026 14:10
JanuszL added a commit that referenced this pull request May 22, 2026
The docs version selector generated legacy-version entries without marking them
as short user-guide links. For DALI 2.x pages, that made the selector add an
unnecessary `docs/` path component.

Mark generated DALI 2.x entries with the existing `short_user` path mode so
the selector builds links that match the published layout.

Signed-off-by: Janusz Lisiecki <jlisiecki@nvidia.com>
JanuszL added a commit that referenced this pull request May 22, 2026
The docs version selector generated legacy-version entries without marking them
as short user-guide links. For DALI 2.x pages, that made the selector add an
unnecessary `docs/` path component.

Mark generated DALI 2.x entries with the existing `short_user` path mode so
the selector builds links that match the published layout.

Signed-off-by: Janusz Lisiecki <jlisiecki@nvidia.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants