From 1c9303a59cae90c9a555349d2f6fd8690a5bf80f Mon Sep 17 00:00:00 2001 From: laughingman7743 Date: Sat, 18 Oct 2025 13:42:10 +0900 Subject: [PATCH] Fix documentation version display MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add fetch-depth: 0 to docs workflow to fetch all git history and tags - Add uv build step before make docs to generate _version.py with hatch-vcs - Add Furo theme options for source repository links This ensures the documentation shows the correct version (e.g., v3.18.1.dev7) instead of incorrect version strings like v0.1.dev1. Fixes #607 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- .github/workflows/docs.yaml | 3 +++ docs/conf.py | 7 +++++++ 2 files changed, 10 insertions(+) diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml index a25be37d..9f5fb602 100644 --- a/.github/workflows/docs.yaml +++ b/.github/workflows/docs.yaml @@ -22,6 +22,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 + with: + fetch-depth: 0 # Fetch all history for version detection - name: Setup Pages uses: actions/configure-pages@v5 - uses: astral-sh/setup-uv@v5 @@ -30,6 +32,7 @@ jobs: enable-cache: true - run: | uv sync --group dev + uv build make docs - name: Upload artifact uses: actions/upload-pages-artifact@v3 diff --git a/docs/conf.py b/docs/conf.py index 74ea5b00..8687507e 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -89,3 +89,10 @@ def get_version(): html_css_files = [ "custom.css", ] + +# Furo theme options +html_theme_options = { + "source_repository": "https://github.com/laughingman7743/PyAthena/", + "source_branch": "master", + "source_directory": "docs/", +}