aboutsummaryrefslogtreecommitdiff
path: root/doc/conf.py
diff options
context:
space:
mode:
authorLoek Le Blansch <loek.le-blansch.pv@renesas.com>2025-10-27 11:27:42 +0100
committerLoek Le Blansch <loek.le-blansch.pv@renesas.com>2025-10-27 14:05:21 +0100
commit6a6c2c23afdff0d95a9302d1a65e6b4c9f19aba1 (patch)
treeeb03e521b3c58cfa4b46f76b140ed13f80ccb5c3 /doc/conf.py
parente78e1def6ff9255f9ab7f5e7875a18e99b1ab1fc (diff)
WIP docs
Diffstat (limited to 'doc/conf.py')
-rw-r--r--doc/conf.py34
1 files changed, 34 insertions, 0 deletions
diff --git a/doc/conf.py b/doc/conf.py
new file mode 100644
index 0000000..07823d6
--- /dev/null
+++ b/doc/conf.py
@@ -0,0 +1,34 @@
+# https://www.sphinx-doc.org/en/master/usage/configuration.html
+
+from os import environ
+from pathlib import Path
+from tomllib import loads as toml_loads
+import sys
+
+repo_root = Path(__file__).parent.parent
+
+sys.path.insert(0, str(repo_root.resolve()))
+import patchtree
+
+project = "patchtree"
+release = "???"
+extensions = [
+ "sphinx.ext.autodoc",
+ "sphinx_automodapi.automodapi",
+]
+templates_path = []
+exclude_patterns = []
+html_theme = "alabaster"
+html_static_path = []
+autodoc_mock_imports = [project]
+
+try:
+ toml = repo_root.joinpath("pyproject.toml").read_text()
+ pyproject = toml_loads(toml)
+ release = pyproject["project"]["version"]
+except:
+ pass
+
+if "RENESAS_INTERNAL" in environ:
+ extensions.append("lpc_cs_sphinx_renesas_theme")
+ html_theme = "lpc_cs_sphinx_renesas_theme"