From 833440f25493cbae5a9fc58dbfd65889634d18d9 Mon Sep 17 00:00:00 2001 From: Eric Wagoner Date: Tue, 10 Nov 2026 19:50:05 -0500 Subject: [PATCH] Count visits with GoatCounter, as the blog does Both pages load the blog's GoatCounter site code. Paths are prefixed with the host so this site's pages stay separate from the blog's in the dashboard. The Green Man page gets the lines from build_web.py. Co-Authored-By: Claude Fable 5.2 --- CLAUDE.md | 1 + README.md | 2 +- greenman-src/build_web.py | 5 +++++ greenman/index.html | 2 ++ index.html | 2 ++ 5 files changed, 11 insertions(+), 1 deletion(-) diff --git a/CLAUDE.md b/CLAUDE.md index 13c62db..fceb222 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -17,6 +17,7 @@ Kestrel's Builds is a static site of craft build write-ups. Builds vary (foam an - Everything in `greenman/` is generated by `greenman-src/`: run `uv run build.py` there and it rewrites `greenman/index.html`, `img/`, `dl/` and `og-image.jpg`. Never hand-edit `greenman/`; change the source and rebuild. The back links, favicon line, description, canonical and Open Graph tags are all written by `greenman-src/build_web.py`. - `deploy` must never upload a generator. Any new source folder must be named `-src/` so the existing exclude covers it; check with `./deploy -n`. - Keep the apostrophe in the index's `` written as `'`. It is deliberate: the opengraph.xyz preview checker cut the description off at a plain apostrophe. +- Visits are counted by GoatCounter, the same site code as the blog (`kestrelsnest`). Every page carries the two-line snippet in its head; the first line prefixes the path with the host, so `/` here is recorded as `builds.kestrelsnest.social/` and does not merge with the blog's `/`. In `greenman/` it is written by `ANALYTICS` in `greenman-src/build_web.py`. - Share previews: `og.png` at the root is a 1200x630 screenshot of the top of the index, so retake it when the index's first card changes. Each build has its own `og-image.jpg` (1200x630) in its folder and its own description and Open Graph tags. ## Adding a build diff --git a/README.md b/README.md index 26e5459..3e67b04 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ greenman-src/ - Generator for everything in greenman/ (not deployed); see it 1. Make a folder for it, named in lowercase with no spaces (`greenman`, `atompunk`). Put its page at `/index.html`, with its images and downloads inside the folder so its links stay relative. 2. In the top-level `index.html`, copy an `` card to the top of the list and change the link, image, alt text, title and the three lines of text. The newest build carries the extra class `first`, which gives it the full-width card; take `first` off the one it replaces. Card images are cropped to fit, so set `object-position` for the new image as `.greenman` does. 3. Give the new build's page a link back to the index, as `greenman/index.html` has at its top and bottom: `← Kestrel's Builds`. -4. In the page's head, link the shared icon (``) and add its own description, canonical and Open Graph tags. Its share image is a 1200 x 630 `og-image.jpg` in the build's folder. +4. In the page's head, link the shared icon (``) and add its own description, canonical and Open Graph tags, and the two GoatCounter lines from the index's head. Its share image is a 1200 x 630 `og-image.jpg` in the build's folder. 5. Retake `og.png`, a 1200 x 630 screenshot of the top of the index, since the first card has changed. 6. Run `./deploy -n` to check what will be uploaded, then `./deploy`. diff --git a/greenman-src/build_web.py b/greenman-src/build_web.py index 540d636..56c31b1 100644 --- a/greenman-src/build_web.py +++ b/greenman-src/build_web.py @@ -10,6 +10,10 @@ DESCRIPTION = 'A half-mask of oak leaves, acorns and bark, built to be worn with OG_DESCRIPTION = 'A half-mask of oak leaves, acorns and bark, built to be worn with glasses. Everything you need to make your own.' OG_ALT = 'A Green Man half-mask worn with glasses: a crown of painted oak leaves above a bark brow ridge, with acorns at the temples and a leaf over the nose.' +# The same GoatCounter site as the blog. Paths are prefixed with the host so this site's pages do not merge with the blog's. +ANALYTICS = ''' +''' + CSS = ''' /* Same ink, bone and gold as the builds index and Kestrel's Hall, and the same serif. Drawings stay on light paper with sans labels. layout: one reading column of guide text; each step is a drawing beside its instructions, stacking on phones */ @@ -102,6 +106,7 @@ def build(out=str(OUT / 'index.html')): +{ANALYTICS} diff --git a/greenman/index.html b/greenman/index.html index 487f863..97e88d5 100644 --- a/greenman/index.html +++ b/greenman/index.html @@ -18,6 +18,8 @@ + +