Skip to content

Commit 7fb7393

Browse files
committed
update pydata theme options
1 parent 73238ba commit 7fb7393

File tree

1 file changed

+25
-13
lines changed

1 file changed

+25
-13
lines changed

docs/source/conf.py

Lines changed: 25 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@
2626
# list see the documentation:
2727
# https://www.sphinx-doc.org/en/master/usage/configuration.html
2828

29-
# -- Path setup --------------------------------------------------------------
30-
3129
import datetime
3230
import os
3331
import sys
@@ -60,8 +58,7 @@ def get_years(start_year=2021):
6058

6159
#https://github.com/spatialaudio/nbsphinx/issues/128#issuecomment-1158712159
6260
html_js_files = [
63-
"require.min.js", # Add to your _static
64-
"custom.js",
61+
"https://cdn.plot.ly/plotly-latest.min.js", # Add Plotly.js
6562
]
6663

6764
extensions = [
@@ -133,8 +130,11 @@ def get_years(start_year=2021):
133130
# directories to ignore when looking for source files.
134131
# This pattern also affects html_static_path and html_extra_path.
135132
exclude_patterns = [
136-
"**/todo", "**/src", "cebra-figures/figures.rst", "cebra-figures/*.rst",
137-
"*/cebra-figures/*.rst", "demo_notebooks/README.rst"
133+
"**/todo",
134+
"**/src",
135+
"cebra-figures/figures.rst",
136+
"cebra-figures/*.rst",
137+
"*/cebra-figures/*.rst" #, "demo_notebooks/README.rst"
138138
]
139139

140140
# -- Options for HTML output -------------------------------------------------
@@ -185,23 +185,26 @@ def get_years(start_year=2021):
185185
"icon": "fas fa-graduation-cap",
186186
},
187187
],
188-
"external_links": [
189-
# {"name": "Mathis Lab", "url": "http://www.mackenziemathislab.org/"},
190-
],
191188
"collapse_navigation": False,
192-
"navigation_depth": 4,
189+
"navigation_depth": 1,
193190
"show_nav_level": 2,
194191
"navbar_align": "content",
195192
"show_prev_next": False,
193+
"navbar_end": ["theme-switcher", "navbar-icon-links.html"],
194+
"navbar_persistent": [],
195+
"header_links_before_dropdown": 7
196196
}
197197

198-
html_context = {"default_mode": "dark"}
198+
html_context = {"default_mode": "light"}
199199
html_favicon = "_static/img/logo_small.png"
200200
html_logo = "_static/img/logo_large.png"
201201

202-
# Remove the search field for now
202+
# Replace with this configuration to enable "on this page" navigation
203203
html_sidebars = {
204-
"**": ["search-field.html", "sidebar-nav-bs.html"],
204+
"**": ["search-field.html", "sidebar-nav-bs", "page-toc.html"],
205+
"demos": ["search-field.html", "sidebar-nav-bs"],
206+
"api": ["search-field.html", "sidebar-nav-bs"],
207+
"figures": ["search-field.html", "sidebar-nav-bs"],
205208
}
206209

207210
# Disable links for embedded images
@@ -289,3 +292,12 @@ def get_years(start_year=2021):
289292
"""
290293
# fmt: on
291294
# flake8: enable=E501
295+
296+
# Configure nbsphinx to properly render Plotly plots
297+
nbsphinx_execute = 'auto'
298+
nbsphinx_allow_errors = True
299+
nbsphinx_requirejs_path = 'https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.7/require.js'
300+
nbsphinx_execute_arguments = [
301+
"--InlineBackend.figure_formats={'png', 'svg', 'pdf'}",
302+
"--InlineBackend.rc=figure.dpi=96",
303+
]

0 commit comments

Comments
 (0)