Skip to content

Commit

Permalink
Merge pull request #19460 from bradcray/index-on-sidebar
Browse files Browse the repository at this point in the history
Move documentation index to sidebar and remove from bottoms of pages

[reviewed by @lydia-duncan]

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.
  • Loading branch information
bradcray committed Mar 18, 2022
2 parents 202aec5 + 411dd1b commit 1338830
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 25 deletions.
8 changes: 0 additions & 8 deletions doc/rst/meta/modules/layoutdist.rst
Expand Up @@ -27,11 +27,3 @@ and describe how domains and arrays are stored across them.
:glob:

dists/**


Index
-----

* :ref:`Chapel Online Documentation Index <genindex>`

.. COMMENT: clean this up before exposing:: * :chpl:chplref:`chplmodindex`
8 changes: 0 additions & 8 deletions doc/rst/meta/modules/packages.rst
Expand Up @@ -17,11 +17,3 @@ inclusion there.
:glob:

packages/*


Index
-----

* :ref:`Chapel Online Documentation Index <genindex>`

.. COMMENT: clean this up before exposing:: * :chpl:chplref:`chplmodindex`
9 changes: 0 additions & 9 deletions doc/rst/meta/modules/standard.rst
Expand Up @@ -116,12 +116,3 @@ Utilities
Regex <standard/Regex>
Time <standard/Time>
Version <standard/Version>



Index
-----

* :ref:`Chapel Online Documentation Index <genindex>`

.. COMMENT: clean this up before exposing:: * :chpl:chplref:`chplmodindex`
8 changes: 8 additions & 0 deletions doc/rst/meta/templates/layout.html
Expand Up @@ -21,3 +21,11 @@
{% include "searchbox.html" %}

{% endblock %}

{% block menu %}
{{ super() }}
<p class="caption" role="heading"><span class="caption-text">Chapel Documentation Index</span></p>
<ul>
<li class="toctree-11"><a class="reference internal" href="{{pathto('genindex.html', 1)}}">Index</a></li>
</ul>
{% endblock %}

0 comments on commit 1338830

Please sign in to comment.