Upgrade Hugo to 0.163.3 and migrate to Bulma 1.0.4/Dart Sass - #745
Open
rossigee wants to merge 3 commits into
Open
Upgrade Hugo to 0.163.3 and migrate to Bulma 1.0.4/Dart Sass#745rossigee wants to merge 3 commits into
rossigee wants to merge 3 commits into
Conversation
Breaking changes fixed:
- markdownify on template.HTML: cast with `| string |` in admonition.html
- disableKinds: rename taxonomyTerm to term in config.toml
- mediaTypes: replace delimiter with suffixes array
- toCSS -> css.Sass, .Site.IsServer -> hugo.IsServer in css.html
- Remove unused version.html shortcode
Bulma 1.0.4 drops LibSass support, so this also:
- Installs Dart Sass via scripts/setup-dart-sass.sh (Hugo needs the
real executable, not the npm JS wrapper), invoked from `make serve`
and exported onto PATH from the Makefile for production builds
- Rewrites assets/sass/*.sass into a single style.scss, loading
Bulma's precompiled CSS via CDN (its own Sass build no longer
needs LibSass/Dart Sass) and layering only site-specific
overrides/CSS custom properties on top
- Removes yarn.lock in favor of npm (package-lock.json only)
- Adds a Dockerfile pinned to Hugo 0.163.3 + Node 20 for local/CI
parity with Netlify
Note: layouts/partials/{navbar,social-buttons}.html,
layouts/_default/baseof.html, layouts/partials/docs/{menu,sidebar}.html
are intentionally untouched here - upstream/main already carries its
own .File nil-guards and its own dark-mode/theme-toggle and CLI-docs
nav features (added independently since this work was branched), so
re-copying the stale versions from the original PR branch would have
reverted already-shipped upstream work.
Verified: `make production-build` succeeds cleanly against current
upstream/main (2261 pages, 0 errors, only pre-existing deprecation
warnings unrelated to this change).
Signed-off-by: Ross Golder <ross@golder.org>
The single-file style.scss rewrite dropped these two partials entirely, even though the JS/HTML wiring for both features (navbar's theme-toggle partial, javascript.html's table-popout.js) was left untouched and still upstream-correct. Result: both features would still activate at runtime but render completely unstyled, since their source .sass files were no longer imported by anything once style.sass was replaced. Converts the indented Sass syntax to SCSS and folds the content directly into style.scss rather than keeping them as separate imports. table-popout.sass's `outline: 2px solid $primary` (a Bulma Sass variable, unavailable now that Bulma is loaded via CDN rather than compiled from source) is replaced with the equivalent hsl(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-l)) already used elsewhere in this file for the same color. Verified by compiling the resulting style.scss directly with Dart Sass (bypassing Hugo/PostCSS, which are hitting an unrelated environment-level Node permission issue in this sandbox): 712 lines of output, dark-mode and table-popout selectors all present, the outline substitution resolves correctly. Signed-off-by: Ross Golder <ross@golder.org>
Same class of breaking change as the docs/ partials: these two templates (added by goharbor#645, after the Hugo upgrade work was originally branched) never got the .File nil-guard that Hugo 0.163 requires. Broke the /cli-docs section outright once content/cli-docs stopped being tracked in git and started coming purely from cli-docs.sh's generated output at build time - the section index page has no .File, and Hugo 0.163 errors instead of Hugo 0.74's more lenient handling. Verified: full `make production-build` succeeds (2150 pages, 0 errors), /cli-docs renders. Signed-off-by: Ross Golder <ross@golder.org>
This was referenced Jul 20, 2026
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
Split out from #731 per review feedback - this is the core Hugo/Bulma upgrade, kept as one PR because the Bulma 1.0.4 bump and the Dart Sass migration are tightly coupled (Bulma 1.0.x drops LibSass support).
Breaking changes fixed for Hugo 0.163.3:
markdownifyontemplate.HTML: cast with| string |inadmonition.htmldisableKinds: renametaxonomyTermtoterminconfig.tomlmediaTypes: replacedelimiterwithsuffixesarraytoCSS->css.Sass,.Site.IsServer->hugo.IsServerincss.html.Filenil-guard fix inlayouts/partials/cli-docs/{menu,sidebar}.html(same class of fix as the existing docs partials already handle, just in templates added by Add documentation for Harbor CLI configuration and encryption management #645 after this branch's history predates it)version.htmlshortcodeBulma 1.0.4 migration:
scripts/setup-dart-sass.sh(Hugo needs the real executable, not the npm JS wrapper), invoked frommake serveand exported ontoPATHfrom theMakefilefor production buildsassets/sass/*.sassinto a singlestyle.scss, loading Bulma's precompiled CSS via CDN and layering only site-specific overrides/CSS custom properties on topassets/sass/dark-mode.sass(Implemented dark mode in harbor website #703) andassets/sass/table-popout.sass(feat(docs): enable popout modal for large tables #693) into the newstyle.scssso those two already-shipped features keep their styling - their JS/HTML wiring (theme-toggle.html,table-popout.js) is untouchedyarn.lockin favor of npm (package-lock.jsononly)Dockerfilepinned to Hugo 0.163.3 + Node 20 for local/CI parity with NetlifyRelated
Part of the work originally proposed in #731, split per @OrlinVasilev's review request. See also:
Test plan
make production-buildsucceeds cleanly against currentmain(2150 pages, 0 errors, only pre-existing Hugo deprecation warnings unrelated to this change)style.scsscompiles standalone via Dart Sass and includes the dark-mode/table-popout selectors