Skip to content

Commit 68a6972

Browse files
migrate to sphinx-immaterial
1 parent 25867c1 commit 68a6972

2 files changed

Lines changed: 29 additions & 20 deletions

File tree

docsource/conf.py

Lines changed: 28 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@
5858
'sphinx.ext.viewcode',
5959
'numpydoc',
6060
'sphinx_git',
61-
'sphinx_sitemap',
6261
'myst_parser',
62+
'sphinx_immaterial',
6363
]
6464
autosummary_generate = True
6565
numpydoc_show_class_members = False
@@ -98,7 +98,7 @@
9898
# The theme to use for HTML and HTML Help pages. See the documentation for
9999
# a list of builtin themes.
100100
#
101-
html_theme = 'sphinx_material'
101+
html_theme = 'sphinx_immaterial'
102102

103103
# Add any paths that contain custom static files (such as style sheets) here,
104104
# relative to this directory. They are copied after the builtin static files,
@@ -118,31 +118,40 @@
118118
# Material theme options (see theme.conf for more information)
119119
html_theme_options = {
120120

121-
# Set the name of the project to appear in the navigation.
122-
'nav_title': 'ElectricPy',
123-
124121
# Specify a base_url used to generate sitemap.xml. If not
125122
# specified, then no sitemap will be built.
126-
'base_url': 'https://electricpy.readthedocs.io/en/latest/',
123+
'site_url': 'https://electricpy.readthedocs.io/en/latest/',
127124

128125
# Set the color and the accent color
129-
'color_primary': 'blue',
130-
'color_accent': 'light-blue',
126+
"palette": [
127+
{
128+
"primary": "light-blue",
129+
"accent": "blue",
130+
"media": "(prefers-color-scheme: light)",
131+
"scheme": "default",
132+
"toggle": {
133+
"icon": "material/toggle-switch-off-outline",
134+
"name": "Switch to dark mode",
135+
}
136+
},
137+
{
138+
"primary": "blue",
139+
"accent": "light-blue",
140+
"media": "(prefers-color-scheme: dark)",
141+
"scheme": "slate",
142+
"toggle": {
143+
"icon": "material/toggle-switch",
144+
"name": "Switch to light mode",
145+
}
146+
},
147+
],
131148

132149
# Set the repo location to get a badge with stats
133150
'repo_url': 'https://github.com/engineerjoe440/ElectricPy/',
134151
'repo_name': 'ElectricPy',
135152

136-
# Set the leading text at the top of the index page and others
137-
"heroes": {
138-
"index": "<b><i>Electrical Engineering for Python</i></b>",
139-
"electricpyapi": "Python functions and constants related to electrical engineering.",
153+
"icon": {
154+
"repo": "fontawesome/brands/github",
155+
"logo": "material/library",
140156
},
141-
142-
# Visible levels of the global TOC; -1 means unlimited
143-
'globaltoc_depth': 2,
144-
# If False, expand all TOC entries
145-
'globaltoc_collapse': False,
146-
# If True, show hidden TOC entries
147-
'globaltoc_includehidden': False,
148157
}

docsource/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ numpydoc
44
myst-parser[linkify]
55
sphinx-sitemap
66
sphinx-git
7-
sphinx-material
7+
sphinx-immaterial
88
coverage-badge
99
numpy
1010
matplotlib

0 commit comments

Comments
 (0)