diff --git a/doc/source/_exts/candidates.py b/doc/source/_exts/candidates.py index 9983bb40..8e008420 100644 --- a/doc/source/_exts/candidates.py +++ b/doc/source/_exts/candidates.py @@ -98,7 +98,7 @@ def build_lists(app): "" ] archived_dir = os.path.join(".", "doc", "source", "results") - for previous in os.listdir(archived_dir): + for previous in sorted(os.listdir(archived_dir), reverse=True): if build_archive(previous, "ptl"): previous_toc.append(" results/%s/ptl.rst" % previous) if build_archive(previous, "tc"):