Skip to content

Commit

Permalink
migrate to sphinx-immaterial
Browse files Browse the repository at this point in the history
  • Loading branch information
engineerjoe440 committed Dec 17, 2023
1 parent 25867c1 commit 68a6972
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 20 deletions.
47 changes: 28 additions & 19 deletions docsource/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@
'sphinx.ext.viewcode',
'numpydoc',
'sphinx_git',
'sphinx_sitemap',
'myst_parser',
'sphinx_immaterial',
]
autosummary_generate = True
numpydoc_show_class_members = False
Expand Down Expand Up @@ -98,7 +98,7 @@
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = 'sphinx_material'
html_theme = 'sphinx_immaterial'

# 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,
Expand All @@ -118,31 +118,40 @@
# Material theme options (see theme.conf for more information)
html_theme_options = {

# Set the name of the project to appear in the navigation.
'nav_title': 'ElectricPy',

# Specify a base_url used to generate sitemap.xml. If not
# specified, then no sitemap will be built.
'base_url': 'https://electricpy.readthedocs.io/en/latest/',
'site_url': 'https://electricpy.readthedocs.io/en/latest/',

# Set the color and the accent color
'color_primary': 'blue',
'color_accent': 'light-blue',
"palette": [
{
"primary": "light-blue",
"accent": "blue",
"media": "(prefers-color-scheme: light)",
"scheme": "default",
"toggle": {
"icon": "material/toggle-switch-off-outline",
"name": "Switch to dark mode",
}
},
{
"primary": "blue",
"accent": "light-blue",
"media": "(prefers-color-scheme: dark)",
"scheme": "slate",
"toggle": {
"icon": "material/toggle-switch",
"name": "Switch to light mode",
}
},
],

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

# Set the leading text at the top of the index page and others
"heroes": {
"index": "<b><i>Electrical Engineering for Python</i></b>",
"electricpyapi": "Python functions and constants related to electrical engineering.",
"icon": {
"repo": "fontawesome/brands/github",
"logo": "material/library",
},

# Visible levels of the global TOC; -1 means unlimited
'globaltoc_depth': 2,
# If False, expand all TOC entries
'globaltoc_collapse': False,
# If True, show hidden TOC entries
'globaltoc_includehidden': False,
}
2 changes: 1 addition & 1 deletion docsource/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ numpydoc
myst-parser[linkify]
sphinx-sitemap
sphinx-git
sphinx-material
sphinx-immaterial
coverage-badge
numpy
matplotlib
Expand Down

0 comments on commit 68a6972

Please sign in to comment.