Skip to content

Commit 145f7f7

Browse files
committed
style: use pydata sphinx theme to render the docs
1 parent 7974c7a commit 145f7f7

2 files changed

Lines changed: 22 additions & 5 deletions

File tree

docs/source/conf.py

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,10 @@
4848
"sphinx.ext.todo",
4949
"sphinx.ext.viewcode",
5050
"sphinx.ext.intersphinx",
51-
"sphinx_rtd_theme",
5251
"sphinx_copybutton",
5352
"nbsphinx",
5453
"nbsphinx_link",
55-
"m2r",
54+
"m2r2",
5655
]
5756

5857
# Add any paths that contain templates here, relative to this directory.
@@ -134,7 +133,7 @@
134133
# The theme to use for HTML and HTML Help pages. See the documentation for
135134
# a list of builtin themes.
136135
#
137-
html_theme = "sphinx_rtd_theme"
136+
html_theme = "pydata_sphinx_theme"
138137

139138
html_context = {
140139
"display_github": True,
@@ -149,7 +148,25 @@
149148
# documentation.
150149
#
151150
html_theme_options = {
152-
"navigation_with_keys": "true",
151+
"show_nav_level": 2,
152+
"navigation_depth": 2,
153+
"navbar_align": "left",
154+
"icon_links": [
155+
{
156+
"name": "GitHub",
157+
"url": "https://github.com/diffpy/pyobjcryst",
158+
"icon": "fab-brands fa-github",
159+
},
160+
],
161+
# "primary_sidebar_end": ["indices.html", "sidebar-ethical-ads.html"]
162+
}
163+
164+
# https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-html_sidebars
165+
html_sidebars = {
166+
"**": ["globaltoc.html", "sidebar-nav-bs"],
167+
# "**": ["localtoc.html"],
168+
# "**": ["sidebar-nav-bs"],
169+
# "<page_pattern>": ["index", "manual-intro", "tutorials", "manual"]
153170
}
154171

155172
# Add any paths that contain custom themes here, relative to this directory.

requirements/docs.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
sphinx
2-
sphinx_rtd_theme
2+
pydata-sphinx-theme
33
sphinx-copybutton
44
nbsphinx
55
nbsphinx-link

0 commit comments

Comments
 (0)