Repository navigation
Import the landing kit as a Hugo module instead of copying it - #34
Merged
Merged
Conversation
The design partials (styles, theme toggle, fork ribbon, the two Octicons and their licence) now come from github.com/go-fleettools/landingkit v0.1.0, pinned in go.mod. The copies are deleted: they were byte-identical to the module's, and copies drift. kit.go keeps `go mod tidy` (which Renovate runs) from deleting the requirement, and every workflow job that runs hugo now sets up Go, which Hugo needs to resolve modules. The built site is byte-identical before and after. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The previous commit carried only go.mod, go.sum and kit.go: a stash round-trip in my working tree unstaged the rest, and it was committed without it. This is the rest of the same change. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.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.
The design partials now come from the Hugo module go-fleettools/landingkit v0.1.0 instead of copies here. The copies were byte-identical to the module's (
styles.htmlmd5750222ab…, and the same for the other five files), and copies drift: six landings already carry a variant stylesheet.What changes
hugo.toml:[module] [[module.imports]] path = "github.com/go-fleettools/landingkit", with a comment.go.mod/go.sum: pingithub.com/go-fleettools/landingkit v0.1.0. Hugo resolves modules with the go command, and Renovate will propose the bumps.kit.go: a//go:build toolsfile that imports the module and never builds. Without it,go mod tidydeletes the requirement because no Go code uses it; I measured this on landingkit's example. The org's Renovate preset runsgomodTidyafter every update, and the grouped branch auto-merges, so the first bump would have removed the module.layouts/partials/{styles,theme-toggle,fork-ribbon}.html,icons/{github,book}.html,icons/OCTICONS-LICENSE(the licence ships with the module).icons/play.html, which is this site's own. Site partials still take precedence over the module's.ci.yml,links.ymlnow runactions/setup-go(go-version-file: go.mod) before Hugo, in the jobs that had no Go.Proof: the built site is byte-identical
I built fresh clones of
mainand of this pushed branch (based on currentmain) the way the workflows do, then randiff -ron the output:hugo0.167.0hugo --minify0.167.0 (ci, links)hugo --gc --minify --baseURL …0.135.0 (deploy)Negative control (run on go-widgets, same change): with the partials deleted and the
[module]import removed, the build fails. With the import, it is identical to main. So the module really is where the partials now come from.hugo mod graphshowsgithub.com/go-fleettools/landingkit@v0.1.0.The playground
playground/is a nested Go module with its owngo.mod, so the new rootgo.moddoes not include it, and none of its files change. On this branch it still vets, its tests pass, and the js/wasm build succeeds. With VCS stamping off (-buildvcs=false), the wasm built on this branch is byte-identical to the one built on main. With stamping on, they differ only byvcs.modifiedon my uncommitted working tree, which proves nothing either way.hugo.ymlandplayground.ymlalready set up Go.🤖 Generated with Claude Code