aboutsummaryrefslogtreecommitdiffstats
path: root/AGENTS.md
diff options
context:
space:
mode:
Diffstat (limited to 'AGENTS.md')
-rw-r--r--AGENTS.md10
1 files changed, 8 insertions, 2 deletions
diff --git a/AGENTS.md b/AGENTS.md
index 5ac922d..2953025 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -363,7 +363,13 @@ internal/web/ server.go (host router, middleware, render helpers)
constraint, so a new style needs a migration), `enabled`
and `sort_order`. `blogView` loads the enabled ones and `placeNotices`
groups them by placement, moving ones for a side column that is not laid
- out into the main column.
+ out into the main column. Two switches hide them: `pages.show_notices`
+ (`Page.ShowNotices`, the page form's "Show announcements on this page",
+ default on) covers the page and its posts, and `theme.post_notices`
+ (`PostNotices`, Design → Content, default on) covers every post page —
+ `renderPage`/`handleBlogPost` put `noNotices` (a typed empty map, so the
+ layout's `index` lookups still work) in `notices` instead. Tag, search
+ and 404 pages always show them.
Rendered by the `notices` template in `layouts/blog.html` inside a
`.notices` wrapper; CSS classes `notice notice-<style>` use translucent
colours so they fit any theme, except `gizmo`: a box framed in the theme's
@@ -478,7 +484,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`, `00011_post_hide_date`; 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`, `00012_page_show_notices`; 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