Page management, step 1: every page in a registry, new pages, hidden and disabled
Migration 080 makes site_pages the list of every page: address, title, intro, Hidden, Disabled (out of menus, sitemap and search) and card order. site.json's pages and Navigation's page list move into it. Pages -> Page management (one editor in place of six) makes new pages of sections at any free address; the admin home opens Pages with a banner and a card per page. A catch-all route draws whatever page is at an address; the fixed pages take their words from the registry and can't be deleted. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
56acedf926
commit
1342691f49
36 changed files with 584 additions and 405 deletions
|
|
@ -21,6 +21,8 @@
|
|||
on an extension (an organization's contacts)
|
||||
singleton the one id this entity ever has; the engine
|
||||
refuses create and delete (see front_page)
|
||||
undeletable ids the engine refuses to delete (the pages the
|
||||
site draws in code)
|
||||
check (db, id) => void, run after a save has written
|
||||
everything, inside its transaction: throw an
|
||||
HttpError to refuse it (site settings' colors)
|
||||
|
|
@ -59,14 +61,7 @@ import { personTagTypes } from "./admin-schema/personTags.js";
|
|||
import { tags } from "./admin-schema/tags.js";
|
||||
import { contactTypes } from "./admin-schema/contactTypes.js";
|
||||
import { redirects } from "./admin-schema/redirects.js";
|
||||
import {
|
||||
communityPage,
|
||||
retreatsPage,
|
||||
resourcesPage,
|
||||
organizationPage,
|
||||
historyPage,
|
||||
shopPage,
|
||||
} from "./admin-schema/sitePages.js";
|
||||
import { pages } from "./admin-schema/sitePages.js";
|
||||
|
||||
export const ENTITIES = {
|
||||
organizations,
|
||||
|
|
@ -81,12 +76,7 @@ export const ENTITIES = {
|
|||
timeline,
|
||||
front_page: frontPage,
|
||||
blog_posts: blogPosts,
|
||||
community_page: communityPage,
|
||||
retreats_page: retreatsPage,
|
||||
resources_page: resourcesPage,
|
||||
organization_page: organizationPage,
|
||||
history_page: historyPage,
|
||||
shop_page: shopPage,
|
||||
pages,
|
||||
navigation: siteNav,
|
||||
site_settings: siteSettings,
|
||||
newsletters,
|
||||
|
|
@ -116,6 +106,8 @@ export const OPTION_QUERIES = {
|
|||
// Link fields with `redirects: true` pick from these (068).
|
||||
redirects: "SELECT id, id || ' (' || target_url || ')' AS label FROM redirects ORDER BY id",
|
||||
blog_posts: "SELECT id, title AS label FROM blog_posts ORDER BY published_on DESC, title",
|
||||
// Navigation's Under page: a page by its address (080).
|
||||
site_pages: "SELECT path AS id, title || ' (' || path || ')' AS label FROM site_pages ORDER BY sort_order, title",
|
||||
|
||||
// org_id rides along so the affiliation row can filter the list
|
||||
// down to teams of the organization it already names.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue