From a52bef20edcd8a473264a9538967d43db029e36d Mon Sep 17 00:00:00 2001 From: Haowei Hsu Date: Mon, 11 May 2026 20:48:58 +0800 Subject: [PATCH] docs: switch docs to shibuya theme and install via venv - change documentation theme from `alabaster` to `shibuya` - add pinned Documentation requirements for `sphinx` and `shibuya` - update workflows to create `.venv` and install with `requirements.txt` - ignore common virtual environment directories (`.conda` and `.venv`) --- .github/workflows/deploy_docs.yml | 7 ++++++- .github/workflows/test.yml | 7 ++++++- .gitignore | 4 ++++ Documentation/conf.py | 2 +- Documentation/requirements.txt | 2 ++ 5 files changed, 19 insertions(+), 3 deletions(-) create mode 100644 Documentation/requirements.txt diff --git a/.github/workflows/deploy_docs.yml b/.github/workflows/deploy_docs.yml index 1641fec05..7abfd6fbf 100644 --- a/.github/workflows/deploy_docs.yml +++ b/.github/workflows/deploy_docs.yml @@ -19,10 +19,15 @@ jobs: - name: Install dependencies run: | sudo apt update -qq - sudo apt install -y make autoconf python3-sphinx + sudo apt install -y make autoconf python3-venv + python3 -m venv .venv + . .venv/bin/activate + pip install --upgrade pip + pip install -r Documentation/requirements.txt - name: Make Documentation run: | + . .venv/bin/activate cd Documentation make html diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 60777bd6a..3b9f2f1cf 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -54,7 +54,11 @@ jobs: - name: Install dependencies run: | sudo apt update -qq - sudo apt install -y make g++ git bison flex gperf libreadline-dev libbz2-dev autoconf python3-sphinx + sudo apt install -y make g++ git bison flex gperf libreadline-dev libbz2-dev autoconf python3-venv + python3 -m venv .venv + . .venv/bin/activate + pip install --upgrade pip + pip install -r Documentation/requirements.txt - name: Build, check and install run: | @@ -69,6 +73,7 @@ jobs: - name: Documentation run: | + . .venv/bin/activate cd Documentation make html diff --git a/.gitignore b/.gitignore index 319b3c199..4547e8487 100644 --- a/.gitignore +++ b/.gitignore @@ -8,6 +8,10 @@ *.swp *~ +# Virtual environments +.conda/ +.venv/ + # Top level generic files tags TAGS diff --git a/Documentation/conf.py b/Documentation/conf.py index 282a520c4..b50c3ea7f 100644 --- a/Documentation/conf.py +++ b/Documentation/conf.py @@ -76,7 +76,7 @@ highlight_language = 'none' # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. # -html_theme = 'alabaster' +html_theme = 'shibuya' # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the diff --git a/Documentation/requirements.txt b/Documentation/requirements.txt new file mode 100644 index 000000000..66dfcfe5a --- /dev/null +++ b/Documentation/requirements.txt @@ -0,0 +1,2 @@ +sphinx==8.1.3 +shibuya==2026.1.9