Count Green Man downloads as GoatCounter events
Each download button records a click as an event named after the file's full path, so downloads sort beside the page in the dashboard. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
1 parent
833440f254
commit
7c43dbd6e2
3 files changed
+5
-3
No files matched your search
@@ -17,7 +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 `<build>-src/` so the existing exclude covers it; check with `./deploy -n`.
|
||||
- Keep the apostrophe in the index's `<meta name="description">` 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`.
|
||||
- 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`. GoatCounter only sees page views, so each download button also carries `data-goatcounter-click`, which records a click as an event named after the file's full path (`builds.kestrelsnest.social/greenman/dl/<file>`). Give a new build's download links the same attribute.
|
||||
- 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
|
||||
|
||||
Reference in new issue
Block a user