Skip to content

update theme #6296

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion conda-envs/environment-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ dependencies:
- myst-nb
- numpydoc
- pre-commit>=2.8.0
- pydata-sphinx-theme>=0.11.0
- pytest-cov>=2.5
- pytest>=3.0
- sphinx-copybutton
Expand All @@ -40,3 +39,5 @@ dependencies:
- sphinx-remove-toctrees
- mypy=0.982
- types-cachetools
- pip:
- git+https://github.com/pymc-devs/pymc-sphinx-theme
3 changes: 2 additions & 1 deletion conda-envs/windows-environment-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ dependencies:
- myst-nb
- numpydoc
- pre-commit>=2.8.0
- pydata-sphinx-theme>=0.11.0
- pytest-cov>=2.5
- pytest>=3.0
- sphinx-autobuild>=0.7
Expand All @@ -37,3 +36,5 @@ dependencies:
- sphinx-remove-toctrees
- mypy=0.982
- types-cachetools
- pip:
- git+https://github.com/pymc-devs/pymc-sphinx-theme
7 changes: 0 additions & 7 deletions docs/source/_static/custom.css

This file was deleted.

9 changes: 0 additions & 9 deletions docs/source/_templates/donate.html

This file was deleted.

8 changes: 0 additions & 8 deletions docs/source/_templates/edit-this-page.html

This file was deleted.

9 changes: 0 additions & 9 deletions docs/source/_templates/footer.html

This file was deleted.

26 changes: 0 additions & 26 deletions docs/source/_templates/layout.html

This file was deleted.

1 change: 0 additions & 1 deletion docs/source/_templates/navbar-version.html

This file was deleted.

4 changes: 0 additions & 4 deletions docs/source/_templates/search-field.html

This file was deleted.

1 change: 0 additions & 1 deletion docs/source/_templates/twitter.html

This file was deleted.

44 changes: 7 additions & 37 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,12 @@
version = pymc.__version__
if os.environ.get("READTHEDOCS", False):
rtd_version = os.environ.get("READTHEDOCS_VERSION", "")
if "." not in rtd_version and rtd_version.lower() != "stable":
if rtd_version.lower() == "stable":
version = pymc.__version__.split("+")[0]
elif rtd_version.lower() == "latest":
version = "dev"
else:
version = rtd_version
else:
rtd_version = "local"
# The full version, including alpha/beta/rc tags.
Expand Down Expand Up @@ -222,47 +226,17 @@ def setup(app):

# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
html_theme = "pydata_sphinx_theme"
html_theme = "pymc_sphinx_theme"


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

html_theme_options = {
"icon_links": [
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@twiecki answering pymc-devs/pymc-examples#465 (comment) here. If you look at the preview you will see that the logos are still there. What is being removed is the triplication of this info. Now this is part of the pymc-sphinx-theme which inherits from pydata-sphinx-theme and sets up most of the common elements between al 3 main websittes (and others like pymc-experimental or pymc-bart)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Amazing!

{
"name": "GitHub",
"url": "https://github.com/pymc-devs/pymc",
"icon": "fab fa-github-square",
},
{
"name": "Twitter",
"url": "https://twitter.com/pymc_devs",
"icon": "fab fa-twitter-square",
},
{
"name": "YouTube",
"url": "https://www.youtube.com/c/PyMCDevelopers",
"icon": "fab fa-youtube",
},
{
"name": "Discourse",
"url": "https://discourse.pymc.io",
"icon": "fab fa-discourse",
},
],
"logo": {
"link": "https://www.pymc.io",
},
"show_prev_next": False,
"navbar_start": ["navbar-logo", "navbar-version"],
"navbar_end": ["navbar-icon-links.html"],
"page_sidebar_items": ["page-toc", "edit-this-page", "donate"],
"header_links_before_dropdown": 6,
"search_bar_text": "Search...",
"use_edit_page_button": True,
"google_analytics_id": "UA-176578023-1",
}
html_context = {
"github_user": "pymc-devs",
Expand Down Expand Up @@ -294,8 +268,7 @@ def setup(app):
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ["../logos", "_static"]
html_css_files = ["custom.css"]
html_static_path = ["../logos"]

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

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

# Additional templates that should be rendered to pages, maps page names to
# template names.
Expand Down
2 changes: 1 addition & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ arviz>=0.13.0
cachetools>=4.2.1
cloudpickle
fastprogress>=0.2.0
git+https://github.com/pymc-devs/pymc-sphinx-theme
h5py>=2.7
ipython>=7.16
jupyter-sphinx
Expand All @@ -17,7 +18,6 @@ numpydoc
pandas>=0.24.0
polyagamma
pre-commit>=2.8.0
pydata-sphinx-theme>=0.11.0
pytest-cov>=2.5
pytest>=3.0
scipy>=1.4.1
Expand Down