diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 0f1da40..ddf6566 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -54,7 +54,8 @@ jobs: python -c "import dapper; print('dapper imported from:', dapper.__file__)" - name: Build Sphinx - run: sphinx-build -b html docs docs/_build/html + run: | + sphinx-build -b html docs docs/_build/html # For pushes (main): hand off to Pages - name: Upload artifact for Pages diff --git a/docs/_static/dapper_custom.css b/docs/_static/dapper_custom.css index c849ab9..2fd9c67 100644 --- a/docs/_static/dapper_custom.css +++ b/docs/_static/dapper_custom.css @@ -7,3 +7,17 @@ table.docutils td, table.docutils th { vertical-align: top; padding: 0.35rem 0.5rem; } + +.sidebar-drawer { + max-width: 8%; +} + +.toc-drawer { + margin-left: auto; + max-width: 12%; +} + +.content { + min-width: 82%; +} + diff --git a/docs/conf.py b/docs/conf.py index 871da97..c5fd605 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -1,13 +1,11 @@ from __future__ import annotations - -"""Sphinx configuration for dapper documentation.""" - +import os from pathlib import Path import sys +"""Sphinx configuration for dapper documentation.""" + # Ensure Sphinx can find src/ before installation -import os -import sys sys.path.insert(0, os.path.abspath("../src")) @@ -21,6 +19,7 @@ try: import dapper # noqa: F401 + release = getattr(dapper, "__version__", "") except Exception: release = "" @@ -78,7 +77,7 @@ "dapper_custom.css", ] -python_use_unqualified_type_names = False # for handling mutiple imports of same name +python_use_unqualified_type_names = False # for handling mutiple imports of same name def _generate_surface_var_docs() -> None: @@ -87,6 +86,7 @@ def _generate_surface_var_docs() -> None: if script.exists(): # run via same interpreter to ensure imports resolve import subprocess + subprocess.check_call([sys.executable, str(script)])