From 586ae396209317a257cdc00485f70d48550dcf98 Mon Sep 17 00:00:00 2001 From: tannevaled Date: Sun, 11 Oct 2026 10:45:49 +0200 Subject: [PATCH] Import the landing kit as a Hugo module instead of a variant copy The page carried its own styles.html with a ruby red written into the rules (#DC2626 -> #7F1D1D) that is not its logo's. It now imports github.com/go-fleettools/landingkit v0.2.0 (hugo.toml [module], go.mod, kit.go, setup-go before Hugo), and [params.brand] is generated by `landingkit brand static/img/logo.svg`: base #9b1c2e, deep #5f111c, bright #f0475a, the logo's own crimson. The nav bar's GitHub button, on the landing and on /performance/, gives way to the fork ribbon pointing at go-embedded-ruby/ruby. mark-github.html is the kit's icons/github.html. The variant sheet had no rule the kit lacks, so there is no site-styles.html. Co-Authored-By: Claude Opus 5.5 (1M context) --- .github/workflows/deploy-pages.yml | 7 + go.mod | 5 + go.sum | 2 + hugo.toml | 29 ++++ kit.go | 9 ++ layouts/_default/list.html | 2 +- layouts/index.html | 4 +- layouts/partials/icons/mark-github.html | 5 - layouts/partials/styles.html | 193 ------------------------ layouts/partials/theme-toggle.html | 1 - 10 files changed, 55 insertions(+), 202 deletions(-) create mode 100644 go.mod create mode 100644 go.sum create mode 100644 kit.go delete mode 100644 layouts/partials/icons/mark-github.html delete mode 100644 layouts/partials/styles.html delete mode 100644 layouts/partials/theme-toggle.html diff --git a/.github/workflows/deploy-pages.yml b/.github/workflows/deploy-pages.yml index fae34a4..b17ce26 100644 --- a/.github/workflows/deploy-pages.yml +++ b/.github/workflows/deploy-pages.yml @@ -29,6 +29,13 @@ jobs: - name: Checkout 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 + - name: Set up Hugo uses: peaceiris/actions-hugo@v3 with: diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..d9a7d42 --- /dev/null +++ b/go.mod @@ -0,0 +1,5 @@ +module github.com/go-embedded-ruby/go-embedded-ruby.github.io + +go 1.27.1 + +require github.com/go-fleettools/landingkit v0.2.0 diff --git a/go.sum b/go.sum new file mode 100644 index 0000000..decc912 --- /dev/null +++ b/go.sum @@ -0,0 +1,2 @@ +github.com/go-fleettools/landingkit v0.2.0 h1:p/LXzr65oSSr42Fvdk2PyWpyWxaCtUoRelNt2WSI4FI= +github.com/go-fleettools/landingkit v0.2.0/go.mod h1:NUBMh7cVFUfD/hX6Xv5ef2O/r4F6rPtPGGVd3T+9qc0= diff --git a/hugo.toml b/hugo.toml index 096d003..1dc2147 100644 --- a/hugo.toml +++ b/hugo.toml @@ -5,6 +5,35 @@ disableKinds = ["taxonomy", "term", "RSS", "sitemap", "404"] [markup.goldmark.renderer] unsafe = true +# The design -- layouts/partials/styles.html, theme-toggle.html, +# fork-ribbon.html and icons/{github,book}.html -- comes from the shared Hugo +# module github.com/go-fleettools/landingkit, not from copies here: the copies +# drifted. Its version is pinned in go.mod (Renovate bumps it), and kit.go +# keeps `go mod tidy` from deleting that requirement. A file of the same name +# under layouts/partials/ would silently override the module's. +[module] + [[module.imports]] + path = "github.com/go-fleettools/landingkit" + +[params.brand] +# Generated by go-fleettools/landingkit from static/img/logo.svg: the colours are +# READ from the logo's gradient, never chosen. Do not add other keys: +# neutrals (backgrounds, surfaces, greys) belong to the shared sheet. +# Contrast: base on white 8.08:1, bright on the dark background 5.29:1. + base = "#9b1c2e" + deep = "#5f111c" + bright = "#f0475a" + shadow = "rgba(155,28,46,.7)" + glow = "rgba(155,28,46,.6)" + wash = "rgba(155,28,46,.10)" + washDeep = "rgba(95,17,28,.06)" + chipBg = "#fde9eb" + chipBorder = "#fac8ce" + chipFg = "#5f111c" + chipBgDark = "rgba(240,71,90,.14)" + chipBorderDark = "rgba(240,71,90,.32)" + chipFgDark = "#f79aa4" + [[params.phases]] name = "Phase 0 — Vertical slice" status = "ready" 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/_default/list.html b/layouts/_default/list.html index 36d54e1..1153651 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -13,8 +13,8 @@ go-embedded-ruby logo go-embedded-ruby {{ partial "theme-toggle.html" . }} - {{ partial "icons/mark-github.html" . }}GitHub + {{ partial "fork-ribbon.html" "https://github.com/go-embedded-ruby/ruby" }}
Performance diff --git a/layouts/index.html b/layouts/index.html index 0e0391a..3268400 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -13,8 +13,8 @@ go-embedded-ruby logo go-embedded-ruby {{ partial "theme-toggle.html" . }} - {{ partial "icons/mark-github.html" . }}GitHub
+ {{ partial "fork-ribbon.html" "https://github.com/go-embedded-ruby/ruby" }}
@@ -98,7 +98,7 @@

Lexer to AOT, in nine phases.

Ruby that ships like Go.

One binary. Six architectures. No cgo, no runtime to install. Embed a real Ruby — or compile it away. Open infrastructure, governed as a commons.

- {{ partial "icons/mark-github.html" . }}Read the source on GitHub → + {{ partial "icons/github.html" . }}Read the source on GitHub →
diff --git a/layouts/partials/icons/mark-github.html b/layouts/partials/icons/mark-github.html deleted file mode 100644 index 17fc355..0000000 --- a/layouts/partials/icons/mark-github.html +++ /dev/null @@ -1,5 +0,0 @@ -{{- /* 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 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/styles.html b/layouts/partials/styles.html deleted file mode 100644 index c01a478..0000000 --- a/layouts/partials/styles.html +++ /dev/null @@ -1,193 +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. */}} - - - - 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 @@ -