From 2a347ced1b4ea8c24440f646df35207c3a3597ac Mon Sep 17 00:00:00 2001 From: grm Date: Thu, 17 Sep 2026 21:42:02 +0300 Subject: Let a post hide its date A checkbox on the post form (posts.hide_date) overriding the theme's "show the date on posts" for that post alone: listings, the post page and search results leave the date out; the feed keeps its pubDate. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01Sd8UPWrvyYCLj97JexNw3A --- AGENTS.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'AGENTS.md') diff --git a/AGENTS.md b/AGENTS.md index bfed5cb..1336739 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -398,7 +398,10 @@ internal/web/ server.go (host router, middleware, render helpers) accepts `YYYY-MM-DD[THH:MM]`), for new and existing posts alike, and it drives ordering, the archive, the feed and the displayed dates. Blank keeps the current value; a new post starts at now. Times are in the server's - zone, which is also the one dates are rendered in. + zone, which is also the one dates are rendered in. `posts.hide_date` + (`Post.HideDate`, the form's "Hide the date on this post") is a per-post + override of the theme's `ShowDates`: the listing, post page and search + templates check `and ShowDates (not .HideDate)`; the feed keeps its `pubDate`. - **Tags** (`tags` + `post_tags` tables, `store/tags.go`, `web/tags.go`): a tag is `name` + unique `slug` (`slug.Make(name)`), so the slug is both the URL (`/tag/`, `handleBlogTag`, published posts of every page, @@ -466,7 +469,7 @@ superadmin password to `admin`. Production refuses both. `-- +goose Up/Down` sections; they run automatically at startup. Never edit an applied migration. Blog chain so far: `00001_init`, `00002_language`, `00003_files`, `00004_tags`, `00005_search`, `00006_format`, `00007_post_image`, - `00008_page_outro`, `00009_gizmo_style`, `00010_font_kind`; control: `00001_init`, `00002_upload_limit`. Both chains were re-baselined at 00001 after + `00008_page_outro`, `00009_gizmo_style`, `00010_font_kind`, `00011_post_hide_date`; control: `00001_init`, `00002_upload_limit`. Both chains were re-baselined at 00001 after the move to per-blog databases; deployments from before it have `goose_db_version` rows 2–7 in the control DB that must be deleted once (README "Upgrading from a single database") or the next control migration -- cgit v1.2.3