Skip to content

Switch Docsy theme to Hugo Modules and unblock Hugo 0.161 upgrade#99

Open
brooke-hamilton wants to merge 2 commits into
mainfrom
switch-to-hugo-modules
Open

Switch Docsy theme to Hugo Modules and unblock Hugo 0.161 upgrade#99
brooke-hamilton wants to merge 2 commits into
mainfrom
switch-to-hugo-modules

Conversation

@brooke-hamilton
Copy link
Copy Markdown
Member

Summary

Replaces the vendored copy of the Docsy theme with a Hugo Modules import, and brings the Hugo CLI bump from #98 along for the ride.

This unblocks the failing CI build on #98. Once this PR merges, #98 can be closed (its hugo-extended bump is included here as the first commit on this branch).

Why CI was failing on #98

PR #98 bumps hugo-extended from ^0.102.3 to ^0.161.1. Hugo 0.161 removed the internal template _internal/google_analytics_async.html (deprecated in v0.123 — it was the snippet for legacy UA-... Analytics IDs; only the G-... GA4 variant remains). The vendored Docsy in radblog/themes/docsy/layouts/partials/head.html still referenced that template in its else branch, so the build errored:

ERROR error building site: html/template:_partials/head.html:52:16:
no such template "_internal/google_analytics_async.html"

Patching the vendored file would work, but the underlying problem is that Docsy was checked in at repo bootstrap and never updated since (Docsy v0.6.0 → current v0.15.0). A stale .gitmodules entry pointed at a non-existent docs/themes/docsy submodule, and radblog/go.mod had a dangling github.com/google/docsy v0.6.0 // indirect requirement — suggesting a half-finished Hugo Modules conversion that this PR completes.

Changes

  • radblog/config.toml — removed theme = "docsy"; added [module].imports for github.com/google/docsy and github.com/google/docsy/dependencies.
  • radblog/go.mod / radblog/go.sumhugo mod get -u upgraded Docsy v0.6.0v0.15.0 and added docsy/dependencies v0.7.2.
  • Removed the entire vendored radblog/themes/docsy/ tree (~260 files); Hugo now pulls Docsy from the module cache.
  • Removed the orphaned root .gitmodules (the submodule it declared has never existed in this repo).
  • .github/workflows/blog.yaml — dropped the now-broken Install Docsy dependencies step (its working directory no longer exists) and the submodules: true checkout flag (no submodules in the repo).
  • Includes the dependabot bump from deps(deps-dev): bump the all group across 1 directory with 2 updates #98: hugo-extended ^0.102.3^0.161.1 in radblog/package.json and radblog/package-lock.json.

Dependabot already has a gomod ecosystem configured for /radblog in .github/dependabot.yml, so future Docsy releases will be picked up automatically.

Validation

Built locally with Hugo 0.161.1 extended:

npm run build           # hugo --minify           → 49 pages, 0 errors
npm run build:preview   # hugo --buildDrafts ...  → 49 pages, 0 errors

Verified GA4 still renders in public/index.html:

gtag/js?id=G-SZ71KL0YSK
googletagmanager

Two pre-existing deprecation warnings remain (out of scope, non-blocking):

  • languageCode config key is deprecated in favor of locale.
  • .Language.LanguageDirection used inside Docsy itself; will be fixed by a future Docsy release.

Follow-up

dependabot Bot and others added 2 commits May 14, 2026 18:18
Bumps the all group with 2 updates in the /radblog directory: [autoprefixer](https://github.com/postcss/autoprefixer) and [hugo-extended](https://github.com/jakejarvis/hugo-extended).


Updates `autoprefixer` from 10.4.27 to 10.5.0
- [Release notes](https://github.com/postcss/autoprefixer/releases)
- [Changelog](https://github.com/postcss/autoprefixer/blob/main/CHANGELOG.md)
- [Commits](postcss/autoprefixer@10.4.27...10.5.0)

Updates `hugo-extended` from 0.102.3 to 0.161.1
- [Commits](jakejarvis/hugo-extended@v0.102.3...v0.161.1)

---
updated-dependencies:
- dependency-name: autoprefixer
  dependency-version: 10.5.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: all
- dependency-name: hugo-extended
  dependency-version: 0.161.1
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: all
...

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Brooke Hamilton <45323234+brooke-hamilton@users.noreply.github.com>
@github-actions
Copy link
Copy Markdown

Static Web App Preview

Environment Deployment
pr99 View workflow run

Deployed from commit 6fdfd9947df3776c15c73a5092521768a28281c4 via the publisher workflow.

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