From 21455f1fbe263e98f126cf097255bdc9c89defb3 Mon Sep 17 00:00:00 2001 From: Haowei Hsu Date: Tue, 4 Aug 2026 14:40:09 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20Add=20shibuya=20to=20doc=20theme?= =?UTF-8?q?=20builds?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AGENTS.md | 3 ++- README.md | 1 + docs/conf.py | 5 +++++ docs/index.md | 1 + pyproject.toml | 1 + tox.ini | 4 +++- 6 files changed, 13 insertions(+), 2 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 8cb34e5..391c041 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -10,7 +10,7 @@ sphinx-design is a Sphinx extension for designing beautiful, view size responsiv - Responsive design inspired by [Bootstrap](https://getbootstrap.com/) (v5), [Material Design](https://material.io), and [Material-UI](https://material-ui.com/) - Support for both reStructuredText and [MyST Markdown](https://myst-parser.readthedocs.io/) (via integration with myst-parser) -The extension works with multiple Sphinx themes including alabaster, sphinx-rtd-theme, pydata-sphinx-theme, sphinx-book-theme, furo, and sphinx-immaterial. +The extension works with multiple Sphinx themes including alabaster, sphinx-rtd-theme, pydata-sphinx-theme, sphinx-book-theme, furo, sphinx-immaterial, and shibuya. ## Repository Structure @@ -103,6 +103,7 @@ tox -e docs-pydata tox -e docs-sbt tox -e docs-furo tox -e docs-im +tox -e docs-shibuya # Clean build (set CLEAN env var) CLEAN=1 tox -e docs-furo diff --git a/README.md b/README.md index a979299..d9f0c12 100644 --- a/README.md +++ b/README.md @@ -33,6 +33,7 @@ View the documentation in multiple themes: - [pydata-sphinx-theme](https://sphinx-design.readthedocs.io/en/pydata-theme) - [sphinx-rtd-theme](https://sphinx-design.readthedocs.io/en/rtd-theme) - [furo](https://sphinx-design.readthedocs.io/en/furo-theme) +- [shibuya](https://sphinx-design.readthedocs.io/en/shibuya-theme) ## Comparison to sphinx-panels diff --git a/docs/conf.py b/docs/conf.py index e715cf4..bcdb1a8 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -128,6 +128,11 @@ }, ], } +if html_theme == "shibuya": + html_theme_options = { + "accent_color": "orange", + "github_url": "https://github.com/executablebooks/sphinx-design", + } exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"] myst_enable_extensions = [ diff --git a/docs/index.md b/docs/index.md index dd9c3d8..8a2ddbf 100644 --- a/docs/index.md +++ b/docs/index.md @@ -89,6 +89,7 @@ sphinx-book-theme pydata-sphinx-theme sphinx-rtd-theme furo +shibuya ``` diff --git a/pyproject.toml b/pyproject.toml index a55ae97..656e631 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -62,6 +62,7 @@ theme-pydata = ["pydata-sphinx-theme~=0.20.0"] theme-rtd = ["sphinx-rtd-theme~=3.1"] theme-sbt = ["sphinx-book-theme~=1.2"] theme-im = ["sphinx-immaterial~=0.13.9"] +theme-shibuya = ["shibuya~=2026.7.12"] [dependency-groups] # keep in sync with the mirrors-mypy / ruff-pre-commit revs in .pre-commit-config.yaml diff --git a/tox.ini b/tox.ini index 3a9b504..a69535f 100644 --- a/tox.ini +++ b/tox.ini @@ -24,7 +24,7 @@ passenv = SD_CSS_EQUIV_BASE commands = pytest {posargs} -[testenv:docs-{alabaster,rtd,pydata,sbt,furo,im}] +[testenv:docs-{alabaster,rtd,pydata,sbt,furo,im,shibuya}] description = Run documentation build for this theme extras = @@ -34,6 +34,7 @@ extras = sbt: theme_sbt furo: theme_furo im: theme_im + shibuya: theme_shibuya allowlist_externals = echo passenv = BUILDER @@ -46,6 +47,7 @@ setenv = sbt: SPHINX_THEME = sphinx_book_theme furo: SPHINX_THEME = furo im: SPHINX_THEME = sphinx_immaterial + shibuya: SPHINX_THEME = shibuya commands_pre = python -c "import shutil; shutil.rmtree('docs/_build/{env:BUILDER:html}/{env:SPHINX_THEME:}', ignore_errors=True) if '{env:CLEAN:}' else None" commands =