From d275e231ece86ad4484894d1429ad4c167dc04e6 Mon Sep 17 00:00:00 2001 From: Nicholas Felt Date: Tue, 17 Oct 2023 16:00:24 -0700 Subject: [PATCH 1/2] docs: Add extension that will enable GitHub Pages use for doc hosting. --- docs/conf.py | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/conf.py b/docs/conf.py index 95781891..f127b676 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -45,6 +45,7 @@ "sphinx.ext.todo", "sphinx.ext.inheritance_diagram", "sphinx.ext.graphviz", + "sphinx.ext.githubpages", "sphinxcontrib.jquery", "sphinxcontrib.mermaid", "sphinx_togglebutton", From 3a6c95711ae8a2a7c85a1458fa0cc1cdc53493a2 Mon Sep 17 00:00:00 2001 From: Nicholas Felt Date: Mon, 23 Oct 2023 10:19:05 -0700 Subject: [PATCH 2/2] docs: Use better theme. --- docs/conf.py | 4 +++- docs/requirements.txt | 1 + pyproject.toml | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/conf.py b/docs/conf.py index f127b676..dd136347 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -12,6 +12,7 @@ from typing import Any, List, Sequence from autoapi.mappers.python.objects import PythonPythonMapper # type: ignore[import] +from better import better_theme_path # pyright: ignore[reportMissingTypeStubs] from jinja2.environment import Environment as JinjaEnvironment from sphinx.application import Sphinx from urllib3 import disable_warnings @@ -131,7 +132,8 @@ def prep_jinja_env(jinja_env: JinjaEnvironment) -> None: # -- Options for HTML output ------------------------------------------------- # 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 = "better" +html_theme_path = [better_theme_path] html_static_path = ["_static"] html_css_files = ["theme_overrides.css"] html_theme_options = { diff --git a/docs/requirements.txt b/docs/requirements.txt index 947730e6..3531ca15 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -3,6 +3,7 @@ jinja2 myst-parser sphinx sphinx-autoapi +sphinx-better-theme sphinx-copybutton sphinx-rtd-theme sphinx-tippy diff --git a/pyproject.toml b/pyproject.toml index 8fbeec2f..a557182b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -127,6 +127,7 @@ python-semantic-release = ">=8.0" ruff = ">=0.0.292" safety = ">=2.1.1" sphinx-autoapi = ">=2.0.0" +sphinx-better-theme = ">=0.1.5" sphinx-copybutton = ">=0.5.1" sphinx-rtd-theme = ">=1.0.0" sphinx-tippy = ">=0.4.1"