Skip to content

Update Hugo to 0.165.0 and Docsy theme to v0.17.0 - #26

Merged
ShakataGaNai merged 1 commit into
mainfrom
hugo-docsy-upgrade
Sep 7, 2026
Merged

ShakataGaNai merged 1 commit into
mainfrom
hugo-docsy-upgrade

Conversation

@ShakataGaNai

Copy link
Copy Markdown
Member

Summary

  • Bumps Hugo from 0.127.0 (mid-2024) to 0.165.0, and the Docsy theme from a mid-2024 pinned commit to v0.17.0 — both were badly out of date.
  • The jump wasn't a version-number-only change; Docsy restructured its repo between these versions (theme moved to a nested github.com/google/docsy/theme Go module, render-hook layout conventions changed, LibSass dropped in favor of external Dart Sass, Bootstrap/Font Awesome now resolved via npm instead of vendored). Each is called out with rationale in the commit message.
  • Fixes the one visual regression the jump introduced: the new theme's favicon partial no longer auto-generates icons from assets/icons/logo.svg, so added static/favicon.svg to restore the browser-tab icon.

Known follow-up (not blocking)

  • apple-touch-icon.png and other raster favicon sizes aren't regenerated — the old theme auto-generated a 17-file set from the logo; this PR restores just the SVG favicon. Worth a dedicated pass with real icon tooling.
  • The print-view URL path moved from /<section>/_print/ to /_print/<section>/ (upstream Docsy's own change).

Test plan

  • Full local build with the new Hugo/Docsy versions: 0 warnings, 0 errors, 75 pages (same page count as before).
  • Visually verified in a browser (light + dark mode): navbar, homepage, /map/, /links/, a docs page with a pageinfo block and heading self-links, a blog post with an embedded image gallery shortcode, and the footer social icons.
  • No browser console errors.
  • npm audit: 0 vulnerabilities (workspace deps for the theme's SCSS didn't introduce any).
  • This PR's own CI run (on: pull_request) will build with the real GitHub Actions environment (Deploy is gated off for non-main, so this is a safe dry run) — check that it goes green before merging.

🤖 Generated with Claude Code

Both were badly out of date (Hugo 0.127.0 from mid-2024, Docsy pinned
to a mid-2024 commit). The jump required several coordinated fixes,
since Docsy split its theme out of the repo root between those
versions:

- module.imports path changed from github.com/google/docsy to
  github.com/google/docsy/theme (the theme now lives in a separate
  nested Go module); go.mod/go.sum updated to match, old docsy
  requirement dropped via `hugo mod tidy`.
- Newer Hugo moved markdown render-hook templates out of
  `_default/_markup/` to a top-level `_markup/` directory, and the
  theme's internal heading-hook template was renamed. Replaced our
  render-heading.html override (which delegated to the theme's old
  internal template name) with the current upstream pattern:
  `{{ partial "td/render-heading.html" . }}`.
- Hugo dropped embedded LibSass; SCSS now compiles via an external
  Dart Sass binary. Added an "Install Dart Sass" CI step.
- The new theme resolves Bootstrap/Font Awesome SCSS via npm
  (previously vendored), generated by `hugo mod npm pack` into
  packages/hugoautogen (committed, matching upstream docsy-example's
  own practice) and wired up via package.json workspaces. CI's
  existing `npm install postcss-cli` already resolves the workspace,
  no change needed there.
- The new theme's favicon partial no longer auto-generates icons
  from assets/icons/logo.svg; it links whichever conventionally-named
  files exist under static/. Added static/favicon.svg (copied from
  the square logo-x.svg mark) to restore the browser-tab icon.
  Follow-up: apple-touch-icon.png and other raster sizes are not
  regenerated (this was a 17-file auto-generated set previously;
  worth a dedicated pass with real icon tooling rather than guessing
  sizes here).
- Cleared the last build warning: languages.en.languageName ->
  languages.en.label (deprecated since Hugo v0.158.0).

Verified with a full local build (0 warnings/errors, 75 pages) and
by eyeballing rendered output in a browser: navbar, dark mode, image
processing, blog image galleries, docs pageinfo blocks, heading
self-links, footer icons, and the last-modified feature (added
earlier this session) all render correctly. No console errors.

Known behavior change: the print-view output path moved from
/<section>/_print/ to /_print/<section>/ (upstream Docsy's own
change, not something we control).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VUMcJyo7WaizZaZequA3Lz
@ShakataGaNai
ShakataGaNai merged commit cbada91 into main Sep 7, 2026
1 check passed
@ShakataGaNai
ShakataGaNai deleted the hugo-docsy-upgrade branch September 7, 2026 01:21
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