Skip to content

Commit 163c624

Browse files
committed
Improve TOCs
1 parent a1fa8a3 commit 163c624

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

cuda_python/docs/exts/release_toc.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ def reverse_toctree(app, doctree, docname):
1111
if docname == "release":
1212
for node in doctree.traverse():
1313
if node.tagname == "toctree":
14-
node["entries"].sort(key=lambda x: Version(Path(x[1]).name.removesuffix("-notes")), reverse=True)
14+
node["entries"] = [(Version(Path(x[1]).name.removesuffix("-notes")), x[1]) for x in node["entries"]]
15+
node["entries"].sort(key=lambda x: x[0], reverse=True)
1516
break
1617

1718

0 commit comments

Comments
 (0)