From ccdc450189a6465c11dfbd3c2194df99aefea2b5 Mon Sep 17 00:00:00 2001 From: "Oriol (ZBook)" Date: Sun, 13 Nov 2022 21:03:16 +0100 Subject: [PATCH 1/3] use pymc_sphinx_theme instead of pydata directly --- _static/custom.css | 8 -------- _templates/donate.html | 9 --------- conf.py | 35 +++-------------------------------- requirements.txt | 2 +- 4 files changed, 4 insertions(+), 50 deletions(-) delete mode 100644 _templates/donate.html diff --git a/_static/custom.css b/_static/custom.css index e8fc223..080fee5 100644 --- a/_static/custom.css +++ b/_static/custom.css @@ -9,11 +9,3 @@ .bg-pymc-three { background-color: #e7b07b96 !important; } - -.navbar-brand { - display: inline-block !important; -} - -.supportbutton a { - color: var(--pst-color-sidebar-link-active); -} diff --git a/_templates/donate.html b/_templates/donate.html deleted file mode 100644 index 6de283a..0000000 --- a/_templates/donate.html +++ /dev/null @@ -1,9 +0,0 @@ -{% if "generated" in sourcename %} -
-{% else %} - diff --git a/conf.py b/conf.py index 46d59db..123d358 100644 --- a/conf.py +++ b/conf.py @@ -44,9 +44,6 @@ "sphinxext.rediraffe", ] -# Add any paths that contain templates here, relative to this directory. -templates_path = ['_templates'] - # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. # This pattern also affects html_static_path and html_extra_path. @@ -61,8 +58,8 @@ # -- Options for extensions -jupyter_execute_notebooks = "auto" -execution_excludepatterns = ["*.ipynb"] +nb_execution_mode = "auto" +nb_execution_excludepatterns = ["*.ipynb"] myst_enable_extensions = ["colon_fence", "deflist", "dollarmath", "amsmath"] intersphinx_mapping = { @@ -138,38 +135,12 @@ 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" # 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_theme_options = { - "icon_links": [ - { - "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", - }, - ], - "use_edit_page_button": True, - "navbar_end": ["search-field.html", "navbar-icon-links.html"], - "page_sidebar_items": ["page-toc", "edit-this-page", "donate"], - "search_bar_text": "Search...", "show_nav_level": 2, } html_context = { diff --git a/requirements.txt b/requirements.txt index 84ffcfe..94f433d 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,4 @@ Sphinx -pydata-sphinx-theme<0.10.1 sphinx-copybutton sphinx-design myst-nb @@ -9,3 +8,4 @@ sphinxext-opengraph sphinx-notfound-page jupyterlite-sphinx sphinxext-rediraffe +git+https://github.com/pymc-devs/pymc-sphinx-theme From b38e1f0fde1ef82ccdfcb64127a8979153460e89 Mon Sep 17 00:00:00 2001 From: "Oriol (ZBook)" Date: Sun, 13 Nov 2022 23:28:47 +0100 Subject: [PATCH 2/3] remove unused config variable --- conf.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/conf.py b/conf.py index 123d358..4ad10f8 100644 --- a/conf.py +++ b/conf.py @@ -125,11 +125,6 @@ def setup(app): ogp_image = "https://www.pymc.io/_static/PyMC.jpg" ogp_use_first_image = True -ogp_custom_meta_tags = [ - # TODO: add fancy twitter specific metadata - # '', -] - # -- Options for HTML output ------------------------------------------------- # The theme to use for HTML and HTML Help pages. See the documentation for From 062c438969de60e3631af438527df807542c80f3 Mon Sep 17 00:00:00 2001 From: "Oriol (ZBook)" Date: Tue, 15 Nov 2022 00:59:26 +0100 Subject: [PATCH 3/3] show only logo in navbar start section --- conf.py | 1 + 1 file changed, 1 insertion(+) diff --git a/conf.py b/conf.py index 4ad10f8..171402b 100644 --- a/conf.py +++ b/conf.py @@ -137,6 +137,7 @@ def setup(app): html_theme_options = { "show_nav_level": 2, + "navbar_start": ["navbar-logo"], } html_context = { "github_user": "pymc-devs",