Skip to content

Commit 8b73792

Browse files
authored
update theme (#6296)
* update theme * move navbar version template to theme
1 parent 5da2617 commit 8b73792

12 files changed

+12
-105
lines changed

conda-envs/environment-dev.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ dependencies:
2727
- myst-nb
2828
- numpydoc
2929
- pre-commit>=2.8.0
30-
- pydata-sphinx-theme>=0.11.0
3130
- pytest-cov>=2.5
3231
- pytest>=3.0
3332
- sphinx-copybutton
@@ -40,3 +39,5 @@ dependencies:
4039
- sphinx-remove-toctrees
4140
- mypy=0.990
4241
- types-cachetools
42+
- pip:
43+
- git+https://github.com/pymc-devs/pymc-sphinx-theme

conda-envs/windows-environment-dev.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ dependencies:
2525
- myst-nb
2626
- numpydoc
2727
- pre-commit>=2.8.0
28-
- pydata-sphinx-theme>=0.11.0
2928
- pytest-cov>=2.5
3029
- pytest>=3.0
3130
- sphinx-autobuild>=0.7
@@ -37,3 +36,5 @@ dependencies:
3736
- sphinx-remove-toctrees
3837
- mypy=0.990
3938
- types-cachetools
39+
- pip:
40+
- git+https://github.com/pymc-devs/pymc-sphinx-theme

docs/source/_static/custom.css

Lines changed: 0 additions & 7 deletions
This file was deleted.

docs/source/_templates/donate.html

Lines changed: 0 additions & 9 deletions
This file was deleted.

docs/source/_templates/edit-this-page.html

Lines changed: 0 additions & 8 deletions
This file was deleted.

docs/source/_templates/footer.html

Lines changed: 0 additions & 9 deletions
This file was deleted.

docs/source/_templates/layout.html

Lines changed: 0 additions & 26 deletions
This file was deleted.

docs/source/_templates/navbar-version.html

Lines changed: 0 additions & 1 deletion
This file was deleted.

docs/source/_templates/search-field.html

Lines changed: 0 additions & 4 deletions
This file was deleted.

docs/source/_templates/twitter.html

Lines changed: 0 additions & 1 deletion
This file was deleted.

docs/source/conf.py

Lines changed: 7 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,12 @@
110110
version = pymc.__version__
111111
if os.environ.get("READTHEDOCS", False):
112112
rtd_version = os.environ.get("READTHEDOCS_VERSION", "")
113-
if "." not in rtd_version and rtd_version.lower() != "stable":
113+
if rtd_version.lower() == "stable":
114+
version = pymc.__version__.split("+")[0]
115+
elif rtd_version.lower() == "latest":
114116
version = "dev"
117+
else:
118+
version = rtd_version
115119
else:
116120
rtd_version = "local"
117121
# The full version, including alpha/beta/rc tags.
@@ -222,47 +226,17 @@ def setup(app):
222226

223227
# The theme to use for HTML and HTML Help pages. See the documentation for
224228
# a list of builtin themes.
225-
html_theme = "pydata_sphinx_theme"
229+
html_theme = "pymc_sphinx_theme"
226230

227231

228232
# Theme options are theme-specific and customize the look and feel of a theme
229233
# further. For a list of options available for each theme, see the
230234
# documentation.
231235

232236
html_theme_options = {
233-
"icon_links": [
234-
{
235-
"name": "GitHub",
236-
"url": "https://github.com/pymc-devs/pymc",
237-
"icon": "fab fa-github-square",
238-
},
239-
{
240-
"name": "Twitter",
241-
"url": "https://twitter.com/pymc_devs",
242-
"icon": "fab fa-twitter-square",
243-
},
244-
{
245-
"name": "YouTube",
246-
"url": "https://www.youtube.com/c/PyMCDevelopers",
247-
"icon": "fab fa-youtube",
248-
},
249-
{
250-
"name": "Discourse",
251-
"url": "https://discourse.pymc.io",
252-
"icon": "fab fa-discourse",
253-
},
254-
],
255237
"logo": {
256238
"link": "https://www.pymc.io",
257239
},
258-
"show_prev_next": False,
259-
"navbar_start": ["navbar-logo", "navbar-version"],
260-
"navbar_end": ["navbar-icon-links.html"],
261-
"page_sidebar_items": ["page-toc", "edit-this-page", "donate"],
262-
"header_links_before_dropdown": 6,
263-
"search_bar_text": "Search...",
264-
"use_edit_page_button": True,
265-
"google_analytics_id": "UA-176578023-1",
266240
}
267241
html_context = {
268242
"github_user": "pymc-devs",
@@ -294,8 +268,7 @@ def setup(app):
294268
# Add any paths that contain custom static files (such as style sheets) here,
295269
# relative to this directory. They are copied after the builtin static files,
296270
# so a file named "default.css" will overwrite the builtin "default.css".
297-
html_static_path = ["../logos", "_static"]
298-
html_css_files = ["custom.css"]
271+
html_static_path = ["../logos"]
299272

300273
# Add any extra paths that contain custom files (such as robots.txt or
301274
# .htaccess) here, relative to this directory. These files are copied
@@ -311,9 +284,6 @@ def setup(app):
311284
# html_use_smartypants = True
312285

313286
# Custom sidebar templates, maps document names to template names.
314-
html_sidebars = {
315-
"**": ["sidebar-nav-bs.html"],
316-
}
317287

318288
# Additional templates that should be rendered to pages, maps page names to
319289
# template names.

requirements-dev.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ arviz>=0.13.0
77
cachetools>=4.2.1
88
cloudpickle
99
fastprogress>=0.2.0
10+
git+https://github.com/pymc-devs/pymc-sphinx-theme
1011
h5py>=2.7
1112
ipython>=7.16
1213
jupyter-sphinx
@@ -17,7 +18,6 @@ numpydoc
1718
pandas>=0.24.0
1819
polyagamma
1920
pre-commit>=2.8.0
20-
pydata-sphinx-theme>=0.11.0
2121
pytest-cov>=2.5
2222
pytest>=3.0
2323
scipy>=1.4.1

0 commit comments

Comments
 (0)