From 32f5de42bca9bccf1c1983fa7dc168a9456479b6 Mon Sep 17 00:00:00 2001 From: tannevaled Date: Tue, 10 Nov 2026 16:06:17 +0100 Subject: [PATCH] landing: the mantra guards are the tool's own, not hand-written ones MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit #75 removed the repeats by hand. ⛔ THE FLEET ALREADY HAS THE COMMAND, and I had not run it: `landingmigrate repeats LAYOUT` — "Find (and with --write hide) what a layout says that the mantra strip already says". On this layout as it stood it named exactly the five fragments a reader had spotted and nothing else: footer hidden while the strip shows · BSD-3-Clause footer hidden while the strip shows CGO_ENABLED=0 · sentence hidden while the strip shows Pure Go, CGO_ENABLED=0. sentence hidden while the strip shows BSD-3-Clause. sentence hidden while the strip shows Pure Go, cgo disabled, BSD-3-Clause. So this is `landingmigrate repeats --write` run on the layout as it was before #75, replacing the hand-written version. Two differences, both the tool's favour: - ⛔ IT USES `$`, NOT `.`. The detector's own idiom is `{{ if not (partial "mantra-on.html" $) }}` — repeats.go says why: "a fragment inside {{ range }} has a repository for its dot". A hand-written `.` renders correctly at a layout's top level AND THE DETECTOR CANNOT SEE IT, so a gate would go on failing on a page that is already right. - It GUARDS the hero's tail where I had deleted it, so the sentence comes back if the strip is ever turned off. That is what the convention is for. Re-running the detector now reports the same fragments as "KEPT, says more: review" and none as hideable, which is the idempotent state. Measured on the built page: "cgo disabled" gone, the footer reads "Pure Go · every library builds for js/wasm". The gate itself is one flag away and is not here: `repeats` always exits 0, so nothing can be built on it without a shell reading its words. The design is on go-fleettools/fleettools#234; the repository was leased to another session. Refs go-fleettools/fleettools#234. Co-Authored-By: Claude Opus 5 --- layouts/index.html | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/layouts/index.html b/layouts/index.html index 7e3e872..778b4e9 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -19,13 +19,7 @@

The whole of PDF
in Go, with no C anywhere.

-

Read a file, write one, rearrange it, draw it, read it back as words and pictures, and edit it with other people — in a browser tab if you like, since every one of these builds for js/wasm. Fonts are parsed and shaped by go-opentype, pages are rasterised by go-gfx.

- {{/* ⛔ THE MANTRA STRIP ABOVE ALREADY SAYS IT. This sentence ended - "Pure Go, CGO_ENABLED=0. BSD-3-Clause." — two chips' worth of words, - a screen's length below the chips themselves, and the page went on to - say both again twice more. landingkit has the question to ask - (partials/mantra-on.html) precisely so a landing says it ONLY when - the strip is off; this landing had never asked it. */}} +

Read a file, write one, rearrange it, draw it, read it back as words and pictures, and edit it with other people — in a browser tab if you like, since every one of these builds for js/wasm. Fonts are parsed and shaped by go-opentype, pages are rasterised by go-gfx. {{ if not (partial "mantra-on.html" $) }}Pure Go, CGO_ENABLED=0.{{ end }} {{ if not (partial "mantra-on.html" $) }}BSD-3-Clause.{{ end }}

{{/* ⛔ DOCUMENTATION FIRST, as on go-richdoc, go-images and go-slides. This landing had the app first and was the odd one out; the order @@ -160,15 +154,11 @@

A subset, an encoding, and text you can still copy.

100 % statement coverage, including the branches that report a bad file.

-

And it runs on {{ len .Site.Params.arches }} architectures, not merely compiles for them.{{ if not (partial "mantra-on.html" .) }} Pure Go, cgo disabled, BSD-3-Clause.{{ end }}

+

And it runs on {{ len .Site.Params.arches }} architectures, not merely compiles for them. {{ if not (partial "mantra-on.html" $) }}Pure Go, cgo disabled, BSD-3-Clause.{{ end }}

{{ partial "icons/github.html" . }}Read the source on GitHub →
- {{/* The idiom landingkit's mantra-on.html documents, used here as written: - the footer says the licence and the cgo setting only when the strip at - the top is not already saying them. What is left either way is the one - claim the strip does NOT make — that every library builds for js/wasm. */}} -
© the go-pdfkit authors{{ if not (partial "mantra-on.html" .) }} · BSD-3-Clause{{ end }}{{ if not (partial "mantra-on.html" .) }}Pure Go · CGO_ENABLED=0 · {{ end }}every library builds for js/wasm
+