Repository navigation
Update Hugo to 0.165.0 and Docsy theme to v0.17.0 - #26
Merged
Merged
Conversation
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
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.
Summary
github.com/google/docsy/themeGo 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.assets/icons/logo.svg, so addedstatic/favicon.svgto restore the browser-tab icon.Known follow-up (not blocking)
apple-touch-icon.pngand 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./<section>/_print/to/_print/<section>/(upstream Docsy's own change).Test plan
/map/,/links/, a docs page with apageinfoblock and heading self-links, a blog post with an embedded image gallery shortcode, and the footer social icons.npm audit: 0 vulnerabilities (workspace deps for the theme's SCSS didn't introduce any).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