Repository navigation
Clarify minimum vs officially supported Hugo versions; guard their sync - #2680
Merged
Merged
Conversation
The param has only ever held the published theme floor, but its comment
called it the "officially supported" version and set:hugo:version
bumped it alongside routine project-build upgrades — a routine bump
could silently drag the documented requirement past the actual floor.
All user-facing usages are requirement statements ("X or later",
module min examples), so the floor is the only value they should carry.
- set:hugo:version now updates only the project build pins; the former
manual "build-only bump" workaround is the only behavior.
- New scripts/hugo-floor-sync.test.mjs (test:tooling) asserts the three
floor declarations agree: theme/theme.toml min_version,
theme/hugo.yaml module.hugoVersion.min, and params.hugoMinVersion.
Validated red-first against a perturbed floor.
- hugo.yaml param comment and maintainer notes ("Hugo version pins")
rewritten around the two distinct versions: project build vs floor.
…test - changelog #official-support: peer-package wording predated the 0.15.0 reorg (docsy#2337 dropped peerDependencies); point at config.hugo_version and engines.node, note pins track latest, link the minimum. - Drop obsolete --omit=peer from install commands and rewrite the broken Hugo-install tip (no peer deps exist to omit). - Maintainer notes: rename sections to 'Minimum version' and 'Officially supported version'; link the official-support policy. - Rename test to tests/hugo-versions.test.mjs (test:hugo-versions): also guards pin-pair sync and minimum <= pin.
The officially supported Hugo version was pinned twice: docsy.dev's hugo-extended dev dependency and root config.hugo_version. The latter's only reader, docsy.dev/scripts/install-hugo.sh, is itself orphaned -- Netlify and CI get Hugo from the hugo-extended dependency at npm install. - Drop config.hugo_version; docsy.dev/package.json hugo-extended is now the single pin declaration. - Delete install-hugo.sh (dead code) and set-hugo-version.mjs with its set:hugo:version script: bumping the pin is now plain npm (update:hugo for latest, npm install -DE [email protected] for exact). - Test: drop the now-moot pin-sync test; min-vs-pin reads the docsy.dev pin directly. - Docs: retarget changelog #official-support and maintainer notes; retitle section to 'Hugo versions'.
Hoist the official-support section out of the changelog's collapsed Definitions block to the top of the page, retitle 'Official support limits' -> 'Official support' (anchor preserved), and rephrase to lead with what is supported. Link to it from both Install Hugo prerequisites sections, and state the Hugo minimum there as a requirement rather than a recommendation.
4 tasks
Keep the section at h3 while it lives inside the Definitions details block (h2 broke the outline; promotion comes with the planned move to docs/). Fix grammar nits from the review pass and list test:hugo-versions in the test-suites table, satisfying the section's cross-reference.
Pin Hugo to the declared minimum (theme.toml min_version) and build the Hugo-module-mode site — the most version-sensitive path: on sub-minimum Hugos, `hugo mod npm pack` emits empty deps and the build breaks, historically even silently (exit 0, unstyled site). Red-proofed by perturbing the minimum to 0.158.0 (build fails on the missing Bootstrap import); green with the declared 0.160.1. This replaces the tag-time reminder to manually validate the minimum: the standard pre-release smoke run now covers it.
The Hugo-versions clarification is user-visible (support policy surfaced, accurate minimum statements), so mark its release-blog mention as pending now rather than relying on the audit refresh to classify it correctly.
Smoke tests can only run after the push in step 7 (they build from the branch's GitHub upstream), so step 8 — not ci:test, which CI runs and must stay fast and offline — is where they belong. Includes the minimum-Hugo-version build lane.
- github-pages.md: note that the example workflow's hugo-version is the minimum; any later release works. - changelog.md: point the minimum-Hugo-version link at the requirement statement itself (#install-hugo). - wrapup.md: drop the stale maintainer-notes section reference from the tag-time item; note that ongoing minimum validation is now the test:smoke lane, run at release step 8.
- hugo-supported-version -> hugo-version: the shortcode renders hugo.Version; name it for what it is. - Maintainer notes: drop the inline 'currently X' (the changelog section is the number's user-facing home) and condense the mechanism note to one sentence. - Official support: scope to the latest Docsy release.
- Rewords the OS support bullet so the latest-minor-release qualifier binds to macOS only; Linux has no single minor-release stream. - Tightens the smoke-test min-Hugo version assertion with a token boundary: v0.160.1 no longer false-greens on v0.160.10. Red-first proven; the extended-edition check stays (guards hugo-extended falling back to a standard binary).
Aligns the setup-node step with the support policy's engines.node (>=24); Node 20 reaches EOL in April 2026.
docsy#2680's hash lands with the next rel-prep refresh, after this PR merges.
The fourth declaration site, docsy.dev's module.hugoVersion.min, is an alias and is guarded by the dedicated alias test.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
hugo-extendedpin). Defines both in maintainer notes › Hugo versions.test:hugo-versionsasserts that the three minimum-version declarations agree, and that minimum ≤ supported.test:smokenow also builds the Hugo-module site using the declared minimum.config.hugo_versionand its orphaned readers (install-hugo.sh,set:hugo:version).#official-supportpolicy, renders the supported version live via the newhugo-versionshortcode, and links the policy from both Install Hugo sections.