Skip to content

Commit

Permalink
non-rtf docs use globaltoc and css
Browse files Browse the repository at this point in the history
  • Loading branch information
mmckerns committed Jul 5, 2023
1 parent d031d06 commit 9c2183f
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 8 deletions.
4 changes: 4 additions & 0 deletions docs/source/_static/css/custom.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
div.sphinxsidebar {
height: 100%; /* 100vh */
overflow: auto; /* overflow-y */
}
12 changes: 8 additions & 4 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@
#
if not on_rtd:
html_theme = 'alabaster' #'bizstyle'
html_css_files = ['css/custom.css',]
#import sphinx_rtd_theme
#html_theme = 'sphinx_rtd_theme'
#html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
Expand All @@ -152,6 +153,8 @@
'gratipay_user': False, # username
'extra_nav_links': {'Module Index': 'py-modindex.html'},
# 'show_related': True,
# 'globaltoc_collapse': True,
'globaltoc_maxdepth': 4,
'show_powered_by': False
}

Expand All @@ -165,19 +168,20 @@
#
# This is required for the alabaster theme
# refs: http://alabaster.readthedocs.io/en/latest/installation.html#sidebars
#if html_theme == 'alabaster':
if on_rtd:
toc_style = 'localtoc.html', # display the toctree
else:
toc_style = 'globaltoc.html', # collapse the toctree
html_sidebars = {
'**': [
'about.html',
'donate.html',
'searchbox.html',
# 'navigation.html',
'localtoc.html', # display the toctree
toc_style, # defined above
'relations.html', # needs 'show_related':True option to display
]
}
#FIXME: donate / UQFoundation (home/github)


# -- Options for HTMLHelp output ------------------------------------------

Expand Down
9 changes: 5 additions & 4 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,17 @@
dill package documentation
==========================

.. automodule:: dill
.. :exclude-members: +
.. toctree::
:hidden:
:maxdepth: 2
:caption: Contents:

self
dill
scripts

.. automodule:: dill
.. :exclude-members: +
Indices and tables
==================

Expand Down

0 comments on commit 9c2183f

Please sign in to comment.