summaryrefslogtreecommitdiff
path: root/sphinx/registry.py
diff options
context:
space:
mode:
Diffstat (limited to 'sphinx/registry.py')
-rw-r--r--sphinx/registry.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/sphinx/registry.py b/sphinx/registry.py
index cdf77cb67..b5b0f5641 100644
--- a/sphinx/registry.py
+++ b/sphinx/registry.py
@@ -93,6 +93,9 @@ class SphinxComponentRegistry:
self.html_inline_math_renderers: Dict[str, Tuple[Callable, Callable]] = {}
self.html_block_math_renderers: Dict[str, Tuple[Callable, Callable]] = {}
+ #: HTML themes
+ self.html_themes: Dict[str, str] = {}
+
#: js_files; list of JS paths or URLs
self.js_files: List[Tuple[str, Dict[str, Any]]] = []
@@ -403,6 +406,9 @@ class SphinxComponentRegistry:
self.html_inline_math_renderers[name] = inline_renderers
self.html_block_math_renderers[name] = block_renderers
+ def add_html_theme(self, name: str, theme_path: str) -> None:
+ self.html_themes[name] = theme_path
+
def load_extension(self, app: "Sphinx", extname: str) -> None:
"""Load a Sphinx extension."""
if extname in app.extensions: # already loaded