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:
Aidan Dona 2026-10-16 23:19:54 -05:00
parent 56acedf926
commit 1342691f49
36 changed files with 584 additions and 405 deletions

23
src/pages/fixedPages.ts Normal file
View file

@ -0,0 +1,23 @@
/* ═══════════════════════════════════════════════════════════════
FIXED PAGES
The pages the site still draws in code, by their site_pages id
(Pages → Page management can rename, move, hide or disable them,
not delete them: server/src/admin-schema/sitePages.js,
FIXED_PAGES). Every other page is its sections (SitePage.tsx).
Each takes its title and intro from its row. The front page is
the index route of its own (Home.tsx).
═══════════════════════════════════════════════════════════════ */
import { lazy, type ComponentType } from 'react'
export type PageText = { title: string; description: string | null }
export const FIXED_PAGES: Record<string, ComponentType<{ page: PageText }>> = {
give: lazy(() => import('./Giving.tsx')),
feedback: lazy(() => import('./Feedback.tsx')),
request: lazy(() => import('./Request.tsx')),
qr: lazy(() => import('./QrCodes.tsx')),
privacy: lazy(() => import('./Privacy.tsx')),
terms: lazy(() => import('./Terms.tsx')),
}