From 5f9fc2a8667a9438b6336d75026f9a455fc9c4ce Mon Sep 17 00:00:00 2001 From: grm Date: Mon, 14 Sep 2026 22:58:08 +0300 Subject: Let the blogger set a post's date, when writing it and afterwards The post date is posts.created_at: it already drives ordering, the archive, the feed and the displayed dates, so making it editable is a form field rather than a new column. The datetime-local input degrades to a text box on old browsers, so the server also accepts the value typed by hand; blank keeps the current date. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01Sd8UPWrvyYCLj97JexNw3A --- AGENTS.md | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'AGENTS.md') diff --git a/AGENTS.md b/AGENTS.md index 97798dc..09d9b7d 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -218,6 +218,13 @@ internal/web/ server.go (host router, middleware, render helpers) Adding a language: an entry in `i18n.languages`, a catalog file, a month table in `monthTables` (nominative, in-date and short forms), and the test gets a copy per language if its rules differ. +- **Post date** is `posts.created_at` — there is no separate "published + at": the blogger sets it on the post form (`posted_at`, a + `datetime-local` input that degrades to a text box; `parsePostDate` + 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. - **Slugs**: auto-generated from the title; on collision generated slugs get `-2`, `-3`…, user-typed slugs return a 409 with a message. - **Errors**: `store.ErrNotFound` / `store.ErrConflict` are the sentinels -- cgit v1.2.3