Skip to content

Commit 7f5ca4f

Browse files
authored
Merge pull request #791 from nkeim/doc-pydata-theme
BLD: Switch docs to PyData theme
2 parents 768a64b + 2cd4b3f commit 7f5ca4f

File tree

1 file changed

+19
-12
lines changed

1 file changed

+19
-12
lines changed

doc/conf.py

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212

1313
import sys
1414
import os
15-
import sphinx_bootstrap_theme
1615
import matplotlib as mpl
1716
mpl.use("Agg")
1817

@@ -40,7 +39,7 @@
4039
]
4140

4241
extlinks = {'issue': ('https://github.com/soft-matter/trackpy/issues/%s',
43-
'GH')}
42+
'GH #%s')}
4443

4544
mathjax_path = 'https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.3/MathJax.js'
4645

@@ -118,27 +117,35 @@
118117

119118
# The theme to use for HTML and HTML Help pages. See the documentation for
120119
# a list of builtin themes.
121-
html_theme = 'bootstrap'
120+
html_theme = 'pydata_sphinx_theme'
122121

123122
# Theme options are theme-specific and customize the look and feel of a theme
124123
# further. For a list of options available for each theme, see the
125124
# documentation.
126125
html_theme_options = {
127-
'source_link_position': "footer",
128-
'bootswatch_theme': "spacelab",
129-
'navbar_sidebarrel': False,
130-
'bootstrap_version': "3",
131-
'navbar_links': [("Tutorial", "tutorial")],
126+
"header_links_before_dropdown": 2,
127+
"navbar_align": "right",
128+
"secondary_sidebar_items": {
129+
"*": ["page-toc"],
130+
"generated/trackpy.*": [],
131+
132+
}
132133
}
133-
# Add any paths that contain custom themes here, relative to this directory.
134-
html_theme_path = sphinx_bootstrap_theme.get_html_theme_path()
135134

136135
# The name for this set of Sphinx documents. If None, it defaults to
137136
# "<project> v<release> documentation".
138-
#html_title = None
137+
html_title = "trackpy " + release
139138

140139
# A shorter title for the navigation bar. Default is the same as html_title.
141-
#html_short_title = None
140+
html_short_title = "trackpy " + release
141+
142+
# Only show left sidebar in API reference
143+
html_sidebars = {
144+
"*": [],
145+
"tutorial/*": [],
146+
"api": ["sidebar-nav-bs"],
147+
"generated/trackpy.*": ["sidebar-nav-bs"],
148+
}
142149

143150
# The name of an image file (relative to this directory) to place at the top
144151
# of the sidebar.

0 commit comments

Comments
 (0)