diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a4ba167..893522e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,6 +14,12 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v7 + # Hugo resolves the landingkit module (hugo.toml [module]) with the go + # command, at the version go.mod pins. + - uses: actions/setup-go@v7 + with: + go-version-file: go.mod + cache: false - uses: peaceiris/actions-hugo@v3 with: hugo-version: "0.168.0" diff --git a/.github/workflows/hugo.yml b/.github/workflows/hugo.yml index 1f2eb6e..1ef91f2 100644 --- a/.github/workflows/hugo.yml +++ b/.github/workflows/hugo.yml @@ -49,6 +49,12 @@ jobs: with: submodules: recursive + # Hugo resolves the landingkit module (hugo.toml [module]) with the go + # command, at the version go.mod pins. + - uses: actions/setup-go@v7 + with: + go-version-file: go.mod + cache: false - name: Setup Pages id: pages uses: actions/configure-pages@v6 diff --git a/.github/workflows/links.yml b/.github/workflows/links.yml index a178535..1ca1980 100644 --- a/.github/workflows/links.yml +++ b/.github/workflows/links.yml @@ -29,6 +29,12 @@ jobs: - uses: actions/checkout@v7 with: submodules: recursive + # Hugo resolves the landingkit module (hugo.toml [module]) with the go + # command, at the version go.mod pins. + - uses: actions/setup-go@v7 + with: + go-version-file: go.mod + cache: false - uses: peaceiris/actions-hugo@v3 with: hugo-version: "0.168.0" diff --git a/README.md b/README.md index 0443a2a..90d1a52 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,11 @@ # go-plot.github.io The go-plot landing page (Hugo) + +## The design is not here + +It comes from the shared Hugo module +[`go-fleettools/landingkit`](https://github.com/go-fleettools/landingkit), +pinned in `go.mod` (Renovate bumps it); `kit.go` keeps `go mod tidy` from +deleting that requirement. `[params.brand]` in `hugo.toml` is read from the logo by +`landingkit brand`. A file under `layouts/partials/` with the name of one of the +kit's would silently override it. diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..40054fb --- /dev/null +++ b/go.mod @@ -0,0 +1,5 @@ +module github.com/go-plot/go-plot.github.io + +go 1.27.3 + +require github.com/go-fleettools/landingkit v0.6.0 diff --git a/go.sum b/go.sum new file mode 100644 index 0000000..44b5185 --- /dev/null +++ b/go.sum @@ -0,0 +1,2 @@ +github.com/go-fleettools/landingkit v0.6.0 h1:lIlazNZ3xTWDSti/16Uo+aSUOFPhVniQaEnILbQmJuE= +github.com/go-fleettools/landingkit v0.6.0/go.mod h1:gBpbziqFcmcjtNknPjy5+AAzGZ5L+pPr9mIJZHpDlZc= diff --git a/hugo.toml b/hugo.toml index e5bc8fa..2e89395 100644 --- a/hugo.toml +++ b/hugo.toml @@ -8,6 +8,11 @@ title = 'go-plot' disableKinds = ['taxonomy', 'term', 'rss', 'sitemap', '404'] +# The design comes from the landing kit, a Hugo module pinned in go.mod. +[module] + [[module.imports]] + path = "github.com/go-fleettools/landingkit" + [markup.goldmark.renderer] unsafe = true diff --git a/kit.go b/kit.go new file mode 100644 index 0000000..72ac4fb --- /dev/null +++ b/kit.go @@ -0,0 +1,9 @@ +//go:build tools + +// This file never builds. A Hugo site has no Go code, so `go mod tidy` -- +// which Renovate runs after every bump -- would find nothing that uses +// github.com/go-fleettools/landingkit and delete its requirement from go.mod. +// Importing it here keeps it. See the landingkit README. +package site + +import _ "github.com/go-fleettools/landingkit" diff --git a/layouts/index.html b/layouts/index.html index 2d851b3..a64f009 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -139,6 +139,6 @@