Migrate to Hugo 0.163.3 + modern hugo-clarity; fix mermaid, search, deprecations#1
Merged
Conversation
Bump the theme module to the 2026 master (css.Sass pipeline) and move the toolchain to Hugo Extended 0.163.3. Fix config deprecations (paginate to pagination.pagerSize, languageName to label). Force a deterministic CSS build via a getStylesBundle override with source maps disabled so the fingerprint matches its SRI hash. Modernize math with Goldmark passthrough and drop the fragile KaTeX innerHTML-rewrite hack. Co-authored-by: Cursor <cursoragent@cursor.com>
…dex path Put mermaid source back inside the rendered element so mermaid.js renders it (the empty data-attribute placeholder produced UnknownDiagramError once the KaTeX rewrite was removed). Override header, i18nlist and rss templates to use .Language.Label and .Site.Language.Locale (LanguageName/LanguageCode were deprecated in Hugo v0.158.0). Expose params.defaultContentLanguage so the theme search fetches the English index from the site root (/index.json) instead of a non-existent /en/index.json. Co-authored-by: Cursor <cursoragent@cursor.com>
…stale theme copy Install the prebuilt Hugo Extended 0.163.3 in CI via peaceiris/actions-hugo (matches the local binary) on Go 1.26, and key the resources cache on the real config path (blog/config/**). Stop tracking blog/resources so Hugo/CI always rebuilds it (avoids stale committed SRI hashes). Remove the unused themes/hugo-clarity-master copy (the site consumes the theme as a module) and update the README dev prerequisites. Co-authored-by: Cursor <cursoragent@cursor.com>
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
Modernizes the site's Hugo toolchain and theme, fixes several latent bugs, and makes local/CI builds match.
peaceiris/actions-hugo, so the CI binary matches local), Go 1.26 for module resolution.hugo-claritymodule bumped from the 2022 pin to the 2026-06-10 master (css.Sasspipeline).paginate->[pagination].pagerSize,languageName->label.getStylesBundleoverride disables source maps for a deterministic fingerprint so the served CSS matches its SRI hash (root cause of the earlier "unstyled dev server").innerHTMLrewrite hack.Fixes
data-mermaid-contentplaceholder producedUnknownDiagramErroronce the KaTeX rewrite was removed.header.html,i18nlist.html,rss.xmluse.Language.Label/.Site.Language.Locale(deprecated in Hugo v0.158.0). Build is now warning-free.params.defaultContentLanguageso English search fetches/index.json(site root) instead of a non-existent/en/index.json.Cleanup / CI
blog/resources/(gitignored) so Hugo/CI always rebuilds it — avoids stale committed SRI hashes.themes/hugo-clarity-master/copy (the site consumes the theme as a module).blog/config/**).Verification (headless Edge against a local server)
styles.*.cssfilename hash matches itsintegrityattribute./index.json(EN) and/lt/index.json(LT) both 200; typing a query returns results.<title>, meta description,Person+WebSiteJSON-LD in<head>, favicon links,robots.txt,llms.txt,sitemap.xml.CNAME(itohi.com) preserved.Notes
hugo-clarity.sassfiles are not Dart-Sass-clean (tab/space + deprecated@import/darken()), so forcingdartsassfails. This caps Hugo at< 0.166(where LibSass is removed) until upstream migrates; thegetStylesBundleoverride flips todartsasswith a one-line change when that happens.Test plan
main(Hugo 0.163.3 extended).