From 411dd1b5339f001db9ed1928b2333c407795d45e Mon Sep 17 00:00:00 2001 From: Brad Chamberlain Date: Wed, 16 Mar 2022 12:17:33 -0700 Subject: [PATCH] Move documentation index to sidebar and remove from bottoms of pages While our online documentation index is a bit overwhelmingly large and badly formatted, it still seems useful, but difficult to discover by not being on our docs sidebar. This PR moves it there and removes it from other places it was mentioned. It turns out that because of the way the index is generated by Sphinx, it's not trivial to get it onto the sidebar, which is why I think it was not there before, and was instead at the bottom of several module-based pages. Here, I took a tip from https://stackoverflow.com/questions/25243482/how-to-add-sphinx-generated-index-to-the-sidebar-when-using-read-the-docs-theme and wedged it in there, though to make it look proper on the web and in the generated HTML, I had to embed more HTML than that solution included. I removed it from the bottoms of the other pages because it seemed unnecessary (it's not specific to those pages in any way) and clutter-y. --- Signed-off-by: Brad Chamberlain --- doc/rst/meta/modules/layoutdist.rst | 8 -------- doc/rst/meta/modules/packages.rst | 8 -------- doc/rst/meta/modules/standard.rst | 9 --------- doc/rst/meta/templates/layout.html | 8 ++++++++ 4 files changed, 8 insertions(+), 25 deletions(-) diff --git a/doc/rst/meta/modules/layoutdist.rst b/doc/rst/meta/modules/layoutdist.rst index bf3c7f547a1c..5ceab6b6611e 100644 --- a/doc/rst/meta/modules/layoutdist.rst +++ b/doc/rst/meta/modules/layoutdist.rst @@ -27,11 +27,3 @@ and describe how domains and arrays are stored across them. :glob: dists/** - - -Index ------ - -* :ref:`Chapel Online Documentation Index ` - -.. COMMENT: clean this up before exposing:: * :chpl:chplref:`chplmodindex` diff --git a/doc/rst/meta/modules/packages.rst b/doc/rst/meta/modules/packages.rst index 26732f95f2aa..a71a42f41b0c 100644 --- a/doc/rst/meta/modules/packages.rst +++ b/doc/rst/meta/modules/packages.rst @@ -17,11 +17,3 @@ inclusion there. :glob: packages/* - - -Index ------ - -* :ref:`Chapel Online Documentation Index ` - -.. COMMENT: clean this up before exposing:: * :chpl:chplref:`chplmodindex` diff --git a/doc/rst/meta/modules/standard.rst b/doc/rst/meta/modules/standard.rst index 394877232324..80a8430a9986 100644 --- a/doc/rst/meta/modules/standard.rst +++ b/doc/rst/meta/modules/standard.rst @@ -116,12 +116,3 @@ Utilities Regex Time Version - - - -Index ------ - -* :ref:`Chapel Online Documentation Index ` - -.. COMMENT: clean this up before exposing:: * :chpl:chplref:`chplmodindex` diff --git a/doc/rst/meta/templates/layout.html b/doc/rst/meta/templates/layout.html index ef042ec3d9b8..6f203789b7a8 100644 --- a/doc/rst/meta/templates/layout.html +++ b/doc/rst/meta/templates/layout.html @@ -21,3 +21,11 @@ {% include "searchbox.html" %} {% endblock %} + +{% block menu %} + {{ super() }} +

Chapel Documentation Index

+ +{% endblock %}