mirror of
https://github.com/gesellix/Bose-SoundTouch.git
synced 2026-08-07 19:28:10 +00:00
- Use relURL (no leading slash) for the sponsor link so it respects the /Bose-SoundTouch/ base path on GitHub Pages; absURL and relURL both ignore the base path when the input starts with / - Inject HUGO_PARAMS_GITHASH (github.sha) via the docs workflow and forward it into the Hugo container via docker-compose.docs.yml + make dev-docs, so the deployed footer shows a clickable short hash linking to the exact commit - Use site.Params.githash (global) instead of .Site.Params.githash because Hextra calls custom/footer.html with a dict context, not a page; .Site is nil in that scope - Use substr not slice to trim the hash to 7 chars Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
35 lines
1.3 KiB
YAML
35 lines
1.3 KiB
YAML
# Local Hugo/Hextra documentation server.
|
|
#
|
|
# Usage:
|
|
# make dev-docs # start the live-reload server (http://localhost:1313)
|
|
# make dev-docs-tidy # run hugo mod tidy (required on first run, or after
|
|
# # changing hugo.toml module imports)
|
|
# make hugo ARGS="..." # run any other hugo CLI command, e.g.
|
|
# # make hugo ARGS="version"
|
|
# # make hugo ARGS="new content/blog/my-post.md"
|
|
#
|
|
# The hugomods/hugo:exts image bundles Hugo extended + Go so Hugo modules
|
|
# (Hextra) work without any extra tooling on the host.
|
|
|
|
services:
|
|
hugo:
|
|
image: hugomods/hugo:exts
|
|
# --source docs/ because docs/ is the Hugo root inside the repo.
|
|
# --baseURL / overrides the production subpath (/Bose-SoundTouch/) so
|
|
# absolute links work at http://localhost:1313/ during local development.
|
|
# The full repo is mounted so enableGitInfo can read git history.
|
|
command: server --source docs/ --baseURL / --bind 0.0.0.0 --buildDrafts --navigateToChanged
|
|
ports:
|
|
- "1313:1313"
|
|
volumes:
|
|
- .:/src
|
|
# Persist the Hugo module cache across runs so 'hugo mod tidy' only
|
|
# downloads Hextra once.
|
|
- hugo-mod-cache:/root/.cache/hugo_cache
|
|
working_dir: /src
|
|
environment:
|
|
- HUGO_PARAMS_GITHASH
|
|
|
|
volumes:
|
|
hugo-mod-cache:
|