diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 2fbe190..eb5f639 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -33,6 +33,7 @@ jobs: run: hugo --source docs/ --minify --destination ../_site --baseURL "${{ steps.pages.outputs.base_url }}" env: HUGO_ENVIRONMENT: production + HUGO_PARAMS_GITHASH: ${{ github.sha }} - name: Upload artifact uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0 with: diff --git a/Makefile b/Makefile index d0bce7f..3cba997 100644 --- a/Makefile +++ b/Makefile @@ -458,7 +458,7 @@ screenshots: # First run: make dev-docs-tidy (downloads Hextra, writes docs/go.sum) # Then: make dev-docs (http://localhost:1313, live reload) dev-docs: - docker compose -f docker-compose.docs.yml up + HUGO_PARAMS_GITHASH=$(shell git rev-parse HEAD) docker compose -f docker-compose.docs.yml up dev-docs-tidy: docker compose -f docker-compose.docs.yml run --rm hugo mod tidy --source docs/ diff --git a/docker-compose.docs.yml b/docker-compose.docs.yml index 76949f5..bff3421 100644 --- a/docker-compose.docs.yml +++ b/docker-compose.docs.yml @@ -27,6 +27,8 @@ services: # downloads Hextra once. - hugo-mod-cache:/root/.cache/hugo_cache working_dir: /src + environment: + - HUGO_PARAMS_GITHASH volumes: hugo-mod-cache: diff --git a/docs/layouts/_partials/custom/footer.html b/docs/layouts/_partials/custom/footer.html index f87a18d..4fe0e46 100644 --- a/docs/layouts/_partials/custom/footer.html +++ b/docs/layouts/_partials/custom/footer.html @@ -1,6 +1,6 @@