Skip to content

Upgrade to Hugo 0.158.0; raise theme min Hugo version; fix language-API deprecations - #2647

Merged
chalin merged 10 commits into
docsy:mainfrom
chalin:chalin-m24-hugo-0.158.0-2026-0611
Jun 11, 2026
Merged

chalin merged 10 commits into
docsy:mainfrom
chalin:chalin-m24-hugo-0.158.0-2026-0611

Conversation

@chalin

@chalin chalin commented Jun 11, 2026 •

Copy link
Copy Markdown
Collaborator

chalin added 8 commits June 11, 2026 13:29
Migrate theme templates and docs off the language config keys and
methods deprecated in Hugo 0.156.0/0.158.0; raise the theme's
minimum Hugo version to 0.158.0 (a 0.16 breaking change):

- theme.toml / theme/hugo.yaml: min version 0.146.0 -> 0.158.0
- Theme templates: Language.Lang -> .Name,
  LanguageDirection -> .Direction, LanguageName -> .Label
- navbar-lang-selector.html: range .Site.Languages -> hugo.Sites
  (preserves disabled entries for untranslated languages)
- offline-search-index.json: .Site.AllPages -> hugo.Sites/.Pages
- User-guide docs: languageName -> label, languageDirection -> direction
- Changelog: breaking-change entry; thanks to @deining (docsy#2594, docsy#2578)

Builds now log zero deprecation notices at --logLevel info.
- tasks/0.16/hugo/index.md: fix maintainer-local plan reference, mark
  baseline as previous, reconcile status
- Changelog: lean past-tense entries; clarify that the breaking change
  is the theme support floor (0.146.0 -> 0.158.0) and that deprecated
  site-config keys still work; link to language.md
- .gitignore: narrow 'local' rule to 'tasks/**/local'
- Maintainer notes: document that set:hugo:version deliberately does
  not touch the theme support floor
- tests/hugo-build/no-deprecations.test.mjs: fail if the site build
  logs any Hugo deprecation notices; includes a sanity case that seeds
  a deprecated API call and asserts that Hugo reports it
- tests/alt-site/offline-search.test.mjs: build with the
  test-offline-search config overlay and validate the generated
  offline-search index (shape, entry count, en+fr coverage); output
  goes to tmp/test-offline-search for post-run inspection
- Wire the new tests into the test script chain as test:extra, using a
  seq runner script (copied from the root package)
When no --repo/--branch flags are given and the current branch has a
GitHub upstream other than main, smoke-test that  the commonupstream
case when validating a PR branch pushed to a fork. Falls back to
google/docsy main otherwise. Explicit flags still override.
- Changelog: clarify the previous Hugo floor (module min 0.146.0 vs the
  0.157.0 documented for Docsy 0.15)
- Task page: note the new automated test guards, trim API-rename detail
  now covered by the changelog, record the deferred lang-selector check
- smoke.test.mjs usage header: flag fallbacks vs upstream default
- repo-reorg execution notes: describe the new upstream-based default
@chalin chalin mentioned this pull request Jun 11, 2026
7 of 8 tasks
chalin added 2 commits June 11, 2026 17:04
- no-deprecations seeded case: also assert the build succeeds, so the
  test distinguishes a deprecation notice from a hard build error
- offline-search test: add known-content spot checks (/docs/ and
  /fr/docs/)
- basic-configuration.md: normalize 'label ="..."' spacing
@chalin
chalin merged commit 5c5733d into docsy:main Jun 11, 2026
15 checks passed
@chalin
chalin deleted the chalin-m24-hugo-0.158.0-2026-0611 branch June 11, 2026 21:31
@chalin chalin added this to the 0.16.0 milestone Jun 26, 2026
chalin added a commit to chalin/docsy that referenced this pull request Jul 17, 2026
Review feedback on the release-prep refresh:

- Changelog: the floor sentence now cites its own decision trail
  (docsy#2668, docsy#2677); the language-keys note is trimmed to a pointer into
  the upgrade guide, which owns the key specifics.
- Hugo post: the amp-escaping heading no longer implies the regression
  persists through 0.160.1; it was fixed in 0.160.0.
- Coverage ledger: the docsy#2647 note points to the later 0.160.1 raise to
  avoid a stale-floor misread.
chalin added a commit to chalin/docsy that referenced this pull request Aug 18, 2026
The probe guards Hugo API deprecations (its original scope, docsy#2647);
with the transpiler swap keeping Dart Sass language deprecations
visible as fix-me reminders, its bare /deprecated/i filter tripped on
every Sass line. Red-proven before the exemption, green after; the
Hugo-API signal is unchanged.
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.

Deprecation warnings when running example site with latest hugo version 0.158.0

1 participant