hugo-styles Maintenance
This page is for maintainers of the shared hugo-styles repository.
Lesson maintainers should start with Updating Downstream Lessons.
Search bundle maintenance
Search uses a vendored FlexSearch bundle so lesson builds do not depend on a CDN.
When Dependabot bumps flexsearch in hugo-styles, refresh the committed bundle:
npm ci
npm run vendor:flexsearchCI runs npm run check:flexsearch to ensure the committed bundle matches the pinned package version.
Shared module release checklist
hugo-styles uses release-please for release PRs, generated changelog updates, and GitHub releases.
The expected local setup is:
prek install --hook-type commit-msgThat installs the standard .pre-commit-config.yaml hook using prek, which is the preferred local runner because it is faster than pre-commit.
CI remains authoritative and runs cz check --rev-range ... on pull requests.
Before merging a release PR or sanity-checking a release candidate:
- run
go test ./...incmd/hugo-styles-migrate - run
npm run check:flexsearch - run
python3 scripts/build-versioned-site.py --base-url / --destination .cache/linkcheck-site --no-minify - run
lychee --cache --config lychee.toml --no-progress --root-dir .cache/linkcheck-site '.cache/linkcheck-site/**/*.html' - run
hugo --gc --minify - confirm the
RELEASE_PLEASE_TOKENsecret is available to the workflow - merge the release PR that
release-pleaseopens
After release, downstream lesson repositories consume updates via:
hugo-styles-templatevendored refresh PRs (go.mod,go.sum, managed files,_vendor/)- direct-module Dependabot PRs or manual
hugo mod get -u ...