Skip to content

Commit 67d1a03

Browse files
committed
Fix docs version selector paths for DALI 2.x (#6354)
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>
1 parent a807a5a commit 67d1a03

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

docs/conf.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,17 @@
286286
versions = []
287287
# the latest is in the archive
288288
correction = -1 if "dev" in version_long else 0
289-
for i in range(10, int(version_short.split(".")[1]) + correction):
289+
290+
# releases for current major version
291+
v_major = int(version_short.split(".")[0])
292+
v_minor = int(version_short.split(".")[1])
293+
for i in range(0, v_minor + correction):
294+
versions.append((f"{v_major}.{i}", f"dali_{v_major}_{i}_0", "short_user"))
295+
296+
# ToDo add logic to handle other major releases after 1 and before the current
297+
298+
# releases pre 2.0
299+
for i in range(10, 54):
290300
if i >= 34:
291301
versions.append((f"1.{i}", f"dali_1_{i}_0", "short_user"))
292302
else:

0 commit comments

Comments
 (0)