Skip to content

Commit e8789a2

Browse files
authored
docs: Change docs theme to PyData Sphinx theme (#2513)
* Switch docs theme to use the PyData Sphinx theme which is used across the broader Scientific Python community ubiquitously. - Replace sphinx-rtd-theme with pydata-sphinx-theme in 'docs' extra. * Reorder the navigation bar to keep API reference sections visible by default. * Remove 'View me on GitHub' ribbon. - The ribbon will cause issues with the theme and isn't needed anymore. * Add Melissa Weber Mendonça to contributors list.
1 parent 7d316ef commit e8789a2

File tree

4 files changed

+8
-13
lines changed

4 files changed

+8
-13
lines changed

docs/conf.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ def setup(app):
5555
'sphinx.ext.viewcode',
5656
'sphinx.ext.githubpages',
5757
'sphinx.ext.intersphinx',
58-
'sphinx_rtd_theme',
5958
'sphinxcontrib.bibtex',
6059
'sphinx.ext.napoleon',
6160
'sphinx_click.ext',
@@ -243,13 +242,13 @@ def setup(app):
243242
# The theme to use for HTML and HTML Help pages. See the documentation for
244243
# a list of builtin themes.
245244
#
246-
html_theme = 'sphinx_rtd_theme'
245+
html_theme = 'pydata_sphinx_theme'
247246

248247
# Theme options are theme-specific and customize the look and feel of a theme
249248
# further. For a list of options available for each theme, see the
250249
# documentation.
251250
#
252-
html_theme_options = {}
251+
html_theme_options = {"header_links_before_dropdown": 6}
253252

254253
# Add any paths that contain custom themes here, relative to this directory.
255254
html_theme_path = []

docs/contributors.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,4 @@ Contributors include:
3434
- Daniel Werner
3535
- Jonas Rembser
3636
- Lorenz Gaertner
37+
- Melissa Weber Mendonça

docs/index.rst

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,25 +8,20 @@
88

99
intro
1010
likelihood
11-
learn
1211
examples
13-
outreach
12+
api
13+
cli
1414
installation
1515
development
1616
faq
17+
learn
1718
babel
18-
cli
19-
api
19+
outreach
2020
citations
2121
governance/ROADMAP
2222
release-notes
2323
contributors
2424

25-
.. raw:: html
26-
27-
<a class="github-fork-ribbon right-top fixed" href="https://github.com/scikit-hep/pyhf/" data-ribbon="View me on GitHub" title="View me on GitHub">View me on GitHub</a>
28-
29-
3025
.. raw:: html
3126

3227
<p id="dev-version"><strong>Warning:</strong> This is a development version. The latest stable version is at <a href="https://pyhf.readthedocs.io/">ReadTheDocs</a>.</p>

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ docs = [
118118
"sphinx>=7.0.0", # c.f. https://github.com/scikit-hep/pyhf/pull/2271
119119
"sphinxcontrib-bibtex>=2.1",
120120
"sphinx-click",
121-
"sphinx-rtd-theme>=1.3.0", # c.f. https://github.com/scikit-hep/pyhf/pull/2271
121+
"pydata-sphinx-theme>=0.15.3",
122122
"nbsphinx!=0.8.8", # c.f. https://github.com/spatialaudio/nbsphinx/issues/620
123123
"ipywidgets",
124124
"sphinx-issues",

0 commit comments

Comments
 (0)