Call local chapters groups, everywhere
The organization kind is 'group', its side table is groups, pages live at /groups/<id> and the Community page's section is #groups. Migration 052 converts existing databases: the kind and the tables whose CHECKs name chapters are rebuilt, the front page count and request category follow, and the site's own /chapters/ and #chapters links in records are rewritten. Request files now go in Requests/Groups on the shared drive. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
175a18976d
commit
38aff34c97
42 changed files with 473 additions and 254 deletions
|
|
@ -169,7 +169,7 @@ function firstParagraph(db, ownerKind, id, slot) {
|
|||
|
||||
/* ── One page ──────────────────────────────────────────────── */
|
||||
|
||||
const ORG_ROUTES = { region: "/regions", chapter: "/chapters", partner: "/partners", national: "/organizations" };
|
||||
const ORG_ROUTES = { region: "/regions", group: "/groups", partner: "/partners", national: "/organizations" };
|
||||
|
||||
function defaults(site, db, pathname) {
|
||||
const home = db.prepare(`SELECT headline, subhead FROM front_page WHERE id = 'home'`).get();
|
||||
|
|
@ -388,7 +388,7 @@ export function metaFor(db, rawPath) {
|
|||
return { ...meta, title: titled(site, page.title), description: plainText(page.description) ?? meta.description };
|
||||
}
|
||||
|
||||
const match = pathname.match(/^\/(events|regions|chapters|partners|organizations|teams|awards|people|blog)\/([^/]+)$/);
|
||||
const match = pathname.match(/^\/(events|regions|groups|partners|organizations|teams|awards|people|blog)\/([^/]+)$/);
|
||||
if (!match) return notFound(meta);
|
||||
|
||||
const [, base, rawId] = match;
|
||||
|
|
@ -404,8 +404,8 @@ export function metaFor(db, rawPath) {
|
|||
return eventMeta(site, db, id, meta);
|
||||
case "regions":
|
||||
return organizationMeta(site, db, id, "region", meta);
|
||||
case "chapters":
|
||||
return organizationMeta(site, db, id, "chapter", meta);
|
||||
case "groups":
|
||||
return organizationMeta(site, db, id, "group", meta);
|
||||
case "partners":
|
||||
return organizationMeta(site, db, id, "partner", meta);
|
||||
case "organizations":
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue