aboutsummaryrefslogtreecommitdiffstats
path: root/AGENTS.md
diff options
context:
space:
mode:
authorgrm <grm@eyesin.space>2026-09-15 23:17:17 +0300
committergrm <grm@eyesin.space>2026-09-15 23:17:17 +0300
commit628dcb814ece6335667e2b719049728aa161d8c9 (patch)
tree8fa4654771bee0166286b32fc123beec892870bb /AGENTS.md
parent2c85ca1a46ddf4652f8fffc53d6bcfbe32b2b4ff (diff)
downloadblogspace-628dcb814ece6335667e2b719049728aa161d8c9.tar.gz
blogspace-628dcb814ece6335667e2b719049728aa161d8c9.tar.bz2
blogspace-628dcb814ece6335667e2b719049728aa161d8c9.zip
Make the post form's tag input a box with a folded list of chips
A checkbox per existing tag stops working once a blog has dozens of them. The form is now one comma-separated box, prefilled with the post's tags, and the blog's tags sit folded under it as chips; a small script toggles a clicked chip in the box, and without it the chips are a plain list to copy from. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Sd8UPWrvyYCLj97JexNw3A
Diffstat (limited to 'AGENTS.md')
-rw-r--r--AGENTS.md10
1 files changed, 6 insertions, 4 deletions
diff --git a/AGENTS.md b/AGENTS.md
index 974fc10..18bc043 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -278,10 +278,12 @@ internal/web/ server.go (host router, middleware, render helpers)
the URL (`/tag/<slug>`, `handleBlogTag`, published posts of every page,
paginated) and the dedupe key — "Go" and "go" are one tag, the first
spelling wins. `Post.Tags` rides along in `postCols` as two arrays.
- The post form offers the blog's existing tags as checkboxes (`tag`) plus
- a comma-separated `new_tags` box; `parseTags` normalises both into one
- list (20 per post, 40 runes each; nothing slug-worthy → dropped) and
- `SetPostTags` stores it after the post is saved. Tags no post carries
+ The post form is one comma-separated `tags` box (prefilled by
+ `tagsText`); the blog's existing tags sit folded under it as chips that
+ a small inline script toggles in the box (a plain list without JS).
+ `parseTags` normalises the box (20 per post, 40 runes each; nothing
+ slug-worthy → dropped) and `SetPostTags` stores it after the post is
+ saved. Tags no post carries
are deleted (`deleteOrphanTags`, also after post/page deletion), so the
form only lists tags in use. `TagCounts` counts published posts only:
a tag on hidden posts alone shows nowhere public and its page is a 404.