From ac125593efe689fabd1e48a7023249c8973698b8 Mon Sep 17 00:00:00 2001 From: grm Date: Fri, 18 Sep 2026 11:22:25 +0300 Subject: Add switches to keep announcements off a page or off post pages Announcements showed on every public page. Now each page has a "Show announcements on this page" checkbox (pages.show_notices, on by default) that covers the page and its posts, and the Design tab's Content section has "Show announcements on post pages" (theme.post_notices, on by default) for bloggers who want notices only on listings, not while reading a post. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01Sd8UPWrvyYCLj97JexNw3A --- internal/db/migrations/blog/00012_page_show_notices.sql | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 internal/db/migrations/blog/00012_page_show_notices.sql (limited to 'internal/db/migrations/blog/00012_page_show_notices.sql') diff --git a/internal/db/migrations/blog/00012_page_show_notices.sql b/internal/db/migrations/blog/00012_page_show_notices.sql new file mode 100644 index 0000000..da4ff3d --- /dev/null +++ b/internal/db/migrations/blog/00012_page_show_notices.sql @@ -0,0 +1,7 @@ +-- +goose Up +-- A per-page switch for the announcements: an "About" page can do without +-- the notices the home page carries. +ALTER TABLE pages ADD COLUMN show_notices boolean NOT NULL DEFAULT true; + +-- +goose Down +ALTER TABLE pages DROP COLUMN show_notices; -- cgit v1.2.3