From e3418e39de611efb7c66c213651c045e33265e41 Mon Sep 17 00:00:00 2001 From: tannevaled Date: Fri, 23 Oct 2026 21:42:17 +0200 Subject: [PATCH] feat: the landing on landingkit v0.6.0, with the mantra strip Moved by landingmigrate: the kit's layout around the same content, the kit's partials no longer copied here, go.mod and kit.go so Renovate bumps the kit, [params.brand] read from the logo, setup-go for the module. 1 repeat(s) of the strip hidden while it shows, 1 kept for review. Verified: nothing of the old page lost. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/ci.yml | 6 + .github/workflows/hugo.yml | 6 + .github/workflows/links.yml | 6 + README.md | 9 + go.mod | 5 + go.sum | 2 + hugo.toml | 5 + kit.go | 9 + layouts/index.html | 2 +- layouts/partials/fork-ribbon.html | 5 - layouts/partials/icons/OCTICONS-LICENSE | 21 -- layouts/partials/icons/book.html | 5 - layouts/partials/icons/github.html | 5 - layouts/partials/styles.html | 247 ------------------------ layouts/partials/theme-toggle.html | 1 - 15 files changed, 49 insertions(+), 285 deletions(-) create mode 100644 go.mod create mode 100644 go.sum create mode 100644 kit.go delete mode 100644 layouts/partials/fork-ribbon.html delete mode 100644 layouts/partials/icons/OCTICONS-LICENSE delete mode 100644 layouts/partials/icons/book.html delete mode 100644 layouts/partials/icons/github.html delete mode 100644 layouts/partials/styles.html delete mode 100644 layouts/partials/theme-toggle.html 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 @@

Plots for the Go scientific stack.

- +
go-plot · go-plot on GitHub{{ if not (partial "mantra-on.html" $) }} · BSD-3-Clause{{ end }}data in · figures out
diff --git a/layouts/partials/fork-ribbon.html b/layouts/partials/fork-ribbon.html deleted file mode 100644 index 3ef81c6..0000000 --- a/layouts/partials/fork-ribbon.html +++ /dev/null @@ -1,5 +0,0 @@ -{{/* The "Fork me on GitHub" corner ribbon (github.blog, 2008), drawn in CSS - with the brand gradient instead of the original PNGs, so it follows the - theme. It replaces the nav bar's GitHub button. Called with the - repository URL: {{ partial "fork-ribbon.html" "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/o/r" }} */}} - diff --git a/layouts/partials/icons/OCTICONS-LICENSE b/layouts/partials/icons/OCTICONS-LICENSE deleted file mode 100644 index aa1fa80..0000000 --- a/layouts/partials/icons/OCTICONS-LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2026 GitHub Inc. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/layouts/partials/icons/book.html b/layouts/partials/icons/book.html deleted file mode 100644 index cf1e882..0000000 --- a/layouts/partials/icons/book.html +++ /dev/null @@ -1,5 +0,0 @@ -{{- /* Octicons "book" (16 px), primer/octicons @primer/octicons-react@19.40.0, copied verbatim, MIT, - (c) GitHub Inc.: the licence is OCTICONS-LICENSE beside this file. - currentColor follows the button in light and dark; aria-hidden, since - the button's text already says where it leads. */ -}} - \ No newline at end of file diff --git a/layouts/partials/icons/github.html b/layouts/partials/icons/github.html deleted file mode 100644 index 118ad5b..0000000 --- a/layouts/partials/icons/github.html +++ /dev/null @@ -1,5 +0,0 @@ -{{- /* GitHub's mark: Octicons "mark-github" (16 px), primer/octicons @primer/octicons-react@19.40.0, - copied verbatim, MIT, (c) GitHub Inc.: the licence is OCTICONS-LICENSE - beside this file. currentColor, so it takes the button's text colour in - both themes; aria-hidden, since the button's text already names GitHub. */ -}} - diff --git a/layouts/partials/styles.html b/layouts/partials/styles.html deleted file mode 100644 index 6b2221a..0000000 --- a/layouts/partials/styles.html +++ /dev/null @@ -1,247 +0,0 @@ -{{/* This page draws its own dark theme (prefers-color-scheme and the - System/Light/Dark toggle). The Dark Reader extension otherwise repaints it - on top -- the hero's brand wash vanished under it on go-fft while the - same CSS showed on go-ndarray -- so it is told to stand down, as - go-pdfkit's page and our Hextra fork already do. This partial is - included in , so every landing on the kit gets the flag. */}} - -{{/* The brand colours are the ONLY thing that differs between the orgs using - this stylesheet, and they are read from [params.brand] rather than written - in. Two byte-identical copies of this file already existed in go-authn and - go-fileshare; a third differing only in a colour block is how a shared - stylesheet stops being shared. - - Every default below is the cyan those two use TODAY, so they can adopt this - file with no params and render exactly what they render now. That property - is checked, not assumed: see the README. - - safeCSS on every value, including the hex ones that would not need it. - html/template rejects rgba(...) in a CSS context and substitutes - ZgotmplZ for the whole declaration -- it does not fail, it renders - nonsense -- so the chip tints came out as `--chip-bg:ZgotmplZ` until a - render-against-render check caught it. Marking only the values that - need it would leave the next person working out which kind each one is. */}} -{{ $br := .Site.Params.brand | default dict }} -{{ $base := $br.base | default "#0079A8" }} -{{ $deep := $br.deep | default "#054A66" }} -{{ $bright := $br.bright | default "#22CCE2" }} -{{ $shadow := $br.shadow | default "rgba(0,121,168,.7)" }} -{{- /* Three more that were written into the RULES rather than taken as - parameters, so every org using this sheet glowed cyan whatever its logo - was. Measured on the published amber page: go-pkgx's rendered CSS carried - four cyan literals -- the nav glyph's drop shadow, both hero washes and - the performance hero's. Each default below is the exact text that was in - the rule, so a build with no [params.brand] still emits a byte-identical - - diff --git a/layouts/partials/theme-toggle.html b/layouts/partials/theme-toggle.html deleted file mode 100644 index a7cccef..0000000 --- a/layouts/partials/theme-toggle.html +++ /dev/null @@ -1 +0,0 @@ -