From bafb4653ae442c8403995f33542ade2d9809dbcf Mon Sep 17 00:00:00 2001 From: Ryan Kubiak Date: Mon, 15 Dec 2025 22:43:35 -0800 Subject: [PATCH] Update docs theme to add dark mode --- docs/README.md | 11 +++++++++++ docs/_static/custom.css | 4 ++++ docs/conf.py | 10 ++-------- docs/requirements.txt | 3 ++- 4 files changed, 19 insertions(+), 9 deletions(-) create mode 100644 docs/README.md create mode 100644 docs/_static/custom.css diff --git a/docs/README.md b/docs/README.md new file mode 100644 index 0000000..f35e7d6 --- /dev/null +++ b/docs/README.md @@ -0,0 +1,11 @@ +## Documentation + +The generated documentation is built with Sphinx. + +### Building + +Install the requirements in requirements.txt. + +In the `pydactyl/docs` directory run `make html` + +Documentation will be generated in the `./build/html` dir. \ No newline at end of file diff --git a/docs/_static/custom.css b/docs/_static/custom.css new file mode 100644 index 0000000..970fee1 --- /dev/null +++ b/docs/_static/custom.css @@ -0,0 +1,4 @@ +body[data-theme="dark"] { + --color-api-name: #71adff; + --color-api-pre-name: #71adff; +} \ No newline at end of file diff --git a/docs/conf.py b/docs/conf.py index cbb9ece..9b07a99 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -38,7 +38,6 @@ "sphinx.ext.autodoc", "sphinx.ext.autosummary", "sphinx.ext.napoleon", - "sphinx_rtd_theme", ] # Add any paths that contain templates here, relative to this directory. @@ -57,18 +56,13 @@ # 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 = 'furo' # 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'] - -# Use RTD theme locally -if not os.environ.get("READTHEDOCS"): - import sphinx_rtd_theme - - html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] +html_css_files = ['custom.css'] def autodoc_remove_class_signatures(app, what, name, obj, options, signature, return_annotation): diff --git a/docs/requirements.txt b/docs/requirements.txt index 98708af..3ef203c 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1 +1,2 @@ -sphinx_rtd_theme==3.0.2 +sphinx +furo