Skip to content

Clarify minimum vs officially supported Hugo versions; guard their sync - #2680

Merged
chalin merged 18 commits into
docsy:mainfrom
chalin:chalin-m24-hugo-min-sync-2026-0717
Jul 18, 2026
Merged

chalin merged 18 commits into
docsy:mainfrom
chalin:chalin-m24-hugo-min-sync-2026-0717

Conversation

@chalin

@chalin chalin commented Jul 17, 2026 •

Copy link
Copy Markdown
Collaborator
  • Names the two Hugo version concepts that had become conflated: the minimum version Docsy requires vs the version it's officially supported on (the docsy.dev hugo-extended pin). Defines both in maintainer notes › Hugo versions.
  • Guards each concept with tests:
    • test:hugo-versions asserts that the three minimum-version declarations agree, and that minimum ≤ supported.
    • test:smoke now also builds the Hugo-module site using the declared minimum.
  • Single-sources the supported version: drops the root config.hugo_version and its orphaned readers (install-hugo.sh, set:hugo:version).
  • Docs: rewrites the changelog's #official-support policy, renders the supported version live via the new hugo-version shortcode, and links the policy from both Install Hugo sections.
  • Preview(s):

chalin added 3 commits July 17, 2026 09:26
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.
@chalin chalin changed the title Redefine params.hugoMinVersion as the theme floor; guard the sync Clarify minimum vs officially supported Hugo versions; guard their sync Jul 17, 2026
chalin added 2 commits July 17, 2026 12:16
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.
chalin added 13 commits July 17, 2026 12:47
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.
@chalin
chalin merged commit 494f3da into docsy:main Jul 18, 2026
16 checks passed
@chalin
chalin deleted the chalin-m24-hugo-min-sync-2026-0717 branch July 18, 2026 15:32
@chalin chalin added this to the 0.16.0 milestone Jul 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant