Skip to content

Commit

Permalink
fix: Fix docs building and change theme (#116)
Browse files Browse the repository at this point in the history
  • Loading branch information
jsfehler authored Jun 5, 2024
1 parent 3e512c5 commit 667b813
Show file tree
Hide file tree
Showing 5 changed files with 62 additions and 4 deletions.
6 changes: 4 additions & 2 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
version: 2

build:
image: latest
os: ubuntu-22.04
tools:
python: "3.12"


python:
version: 3.8
install:
- requirements: requirements/docs.txt
- method: pip
Expand Down
47 changes: 46 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
'sphinx.ext.coverage',
'sphinx.ext.napoleon',
'sphinx_autodoc_typehints',
'sphinx_immaterial',
]

napoleon_use_param = True
Expand All @@ -56,9 +57,53 @@
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = 'sphinx_rtd_theme'
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,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']

html_theme_options = {
"repo_url": "https://github.com/jsfehler/inori",
"repo_name": "inori",
"icon": {
"repo": "fontawesome/brands/git",
"edit": "material/file-edit-outline",
},
"font": False,
"features": [
"navigation.expand",
"navigation.sections",
"navigation.top",
"navigation.tracking",
"search.share",
"toc.follow",
"toc.sticky",
"content.tabs.link",
"announce.dismiss",
],
"palette": [
{
"media": "(prefers-color-scheme: light)",
"scheme": "default",
"primary": "blue-grey",
"accent": "orange",
"toggle": {
"icon": "material/lightbulb-outline",
"name": "Switch to dark mode",
},
},
{
"media": "(prefers-color-scheme: dark)",
"scheme": "slate",
"primary": "grey",
"accent": "amber",
"toggle": {
"icon": "material/lightbulb",
"name": "Switch to light mode",
},
},
],

}
2 changes: 1 addition & 1 deletion inori/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from .client import Client
from .route import Route

from .version import __version__ # NOQA: F401

__all__ = ['Client', 'Route']
2 changes: 2 additions & 0 deletions requirements/docs.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
shibari==0.0.2
Sphinx==7.3.7
sphinx-autodoc-typehints==2.1.1
sphinx-immaterial==0.11.11
9 changes: 9 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,12 @@ skip_install = true
deps = -rrequirements/lint.txt
changedir = .
commands = flake8 inori tests

[testenv:build_docs]
allowlist_externals = make
deps =
-rrequirements/docs.txt
changedir = docs/
commands =
make clean
make {posargs}

0 comments on commit 667b813

Please sign in to comment.