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
|
|
@ -1,7 +1,7 @@
|
|||
/* The site's own pages (Community, Retreats, Resources, Organization,
|
||||
History), built in the admin from sections: GET /site-pages/:id
|
||||
for one page's sections, GET /site-pages for every page's section
|
||||
headings (the header's dropdowns, the footer, the side nav). */
|
||||
/* The site's pages of sections (Pages → Page management): GET
|
||||
/site-pages/:id for one page's title, intro and sections, GET
|
||||
/site-pages for every page's section headings by the page's path
|
||||
(the header's dropdowns, the footer, the side nav). */
|
||||
|
||||
import { useRecord, type Resource } from './useRecord.ts'
|
||||
import type { ContentBlock } from './useContent.ts'
|
||||
|
|
@ -24,7 +24,7 @@ export type SitePageSection = {
|
|||
blocks: ContentBlock[]
|
||||
}
|
||||
|
||||
export const useSitePage = (id: string): Resource<{ id: string; sections: SitePageSection[] }> =>
|
||||
export const useSitePage = (id: string): Resource<{ id: string; title: string; description: string | null; sections: SitePageSection[] }> =>
|
||||
useRecord(`/site-pages/${id}`, 'page')
|
||||
|
||||
export const useSitePageHeadings = (): Resource<Record<string, Array<{ anchor: string; title: string }>>> =>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue