From b94da111e735cb34873cbadeadf47cfcb10eefc9 Mon Sep 17 00:00:00 2001 From: Jeremy Stanley Date: Fri, 5 Oct 2018 14:33:53 +0000 Subject: [PATCH] Reverse sort order for resolution date globs Sphinx 1.5 and later allows a :reversed: parameter for :glob: toctrees. Since we're presenting our resolution index in reverse chronological order grouped by year, reversing the glob order keeps the dates within each year consistently ordered as well. Yes, this is probably me being OCD. The SIGs governance resolution file was inconsistently named, leading to it showing up outside the expected sort order. Rename the file and add a permanent redirect from the old URL to the new one. Related cleanup, the main index toctree was incorrectly marked as a :glob: even though it didn't use any wildcard patterns so has been corrected. Change-Id: Ifbc6db87e41f01311b430080b97154d01708a2d4 --- doc/source/_extra/.htaccess | 3 ++- doc/source/index.rst | 1 - doc/test/redirect-tests.txt | 1 + ...03-19-sig-governance.rst => 20180319-sig-governance.rst} | 0 resolutions/index.rst | 6 ++++++ resolutions/superseded/index.rst | 1 + 6 files changed, 10 insertions(+), 2 deletions(-) rename resolutions/{2018-03-19-sig-governance.rst => 20180319-sig-governance.rst} (100%) diff --git a/doc/source/_extra/.htaccess b/doc/source/_extra/.htaccess index c0f54d326..f1e192351 100644 --- a/doc/source/_extra/.htaccess +++ b/doc/source/_extra/.htaccess @@ -1 +1,2 @@ -redirect 301 /tc/reference/top-5-help-wanted.html /tc/reference/help-most-needed.html \ No newline at end of file +redirect 301 /tc/reference/top-5-help-wanted.html /tc/reference/help-most-needed.html +redirect 301 /tc/resolutions/2018-03-19-sig-governance.html /tc/resolutions/20180319-sig-governance.html diff --git a/doc/source/index.rst b/doc/source/index.rst index 1bd0ba6f3..ca0046f5e 100644 --- a/doc/source/index.rst +++ b/doc/source/index.rst @@ -27,7 +27,6 @@ Reference documents and Resolutions .. toctree:: :maxdepth: 2 - :glob: :titlesonly: reference/index diff --git a/doc/test/redirect-tests.txt b/doc/test/redirect-tests.txt index bf165998b..b9b3a6d3f 100644 --- a/doc/test/redirect-tests.txt +++ b/doc/test/redirect-tests.txt @@ -1 +1,2 @@ /tc/reference/top-5-help-wanted.html 301 /tc/reference/help-most-needed.html +/tc/resolutions/2018-03-19-sig-governance.html 301 /tc/resolutions/20180319-sig-governance.html diff --git a/resolutions/2018-03-19-sig-governance.rst b/resolutions/20180319-sig-governance.rst similarity index 100% rename from resolutions/2018-03-19-sig-governance.rst rename to resolutions/20180319-sig-governance.rst diff --git a/resolutions/index.rst b/resolutions/index.rst index 2da657d7b..cc1412f6c 100644 --- a/resolutions/index.rst +++ b/resolutions/index.rst @@ -13,6 +13,7 @@ be expressed as a resolution. .. toctree:: :maxdepth: 1 :glob: + :reversed: 2018* @@ -22,6 +23,7 @@ be expressed as a resolution. .. toctree:: :maxdepth: 1 :glob: + :reversed: 2017* @@ -31,6 +33,7 @@ be expressed as a resolution. .. toctree:: :maxdepth: 1 :glob: + :reversed: 2016* @@ -40,6 +43,7 @@ be expressed as a resolution. .. toctree:: :maxdepth: 1 :glob: + :reversed: 2015* @@ -49,6 +53,7 @@ be expressed as a resolution. .. toctree:: :maxdepth: 1 :glob: + :reversed: 2014* @@ -58,5 +63,6 @@ be expressed as a resolution. .. toctree:: :maxdepth: 1 :glob: + :reversed: 2013* diff --git a/resolutions/superseded/index.rst b/resolutions/superseded/index.rst index b8a5e79fa..2a4500832 100644 --- a/resolutions/superseded/index.rst +++ b/resolutions/superseded/index.rst @@ -8,5 +8,6 @@ resolutions. .. toctree:: :maxdepth: 1 :glob: + :reversed: *