Leadership becomes the Organization page, at /organization
Three sections: Mission, Vision & Values from the national organization record's own description and content blocks; Leadership as that record's teams with their people; Details & Contact with NGU's address, nonprofit status, email and the record's contact links. /leadership answers with a 301 to /organization (MOVED in routes/pages.js), and a page title or intro saved for it in Site settings moves with it (migration 054). OrganizationDetail's team list and contact buttons are now shared components (OrgTeams, OrgContact), and NGU's address and email live once in src/data/organizationDetails.ts for the footer, the page and ComingSoon. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
7c7cdaac14
commit
499662b59a
15 changed files with 400 additions and 268 deletions
|
|
@ -21,6 +21,9 @@
|
|||
the app's own not-found page with a 404 status, so search engines
|
||||
drop it.
|
||||
|
||||
A page that moved answers with a 301 to where it is now (MOVED),
|
||||
so old links, QR codes and search results keep working.
|
||||
|
||||
If the metadata can't be built (no site.json at SITE_CONFIG, say),
|
||||
the page is still served, as built, and the cause is logged once:
|
||||
a preview is never worth a page that won't load.
|
||||
|
|
@ -89,12 +92,23 @@ pages.get("/sitemap.xml", (c) => {
|
|||
});
|
||||
});
|
||||
|
||||
/* Pages that have moved: old path → new, query string kept. */
|
||||
const MOVED = {
|
||||
"/leadership": "/organization",
|
||||
};
|
||||
|
||||
pages.get("*", (c, next) => {
|
||||
const pathname = c.req.path;
|
||||
// The API's own paths, and an upload that isn't there, stay plain
|
||||
// 404s rather than becoming a page.
|
||||
if (/^\/(api|uploads)(\/|$)/.test(pathname)) return next();
|
||||
|
||||
const moved = MOVED[pathname.replace(/(.)\/+$/, "$1")];
|
||||
if (moved) {
|
||||
const query = new URL(c.req.url).search;
|
||||
return c.redirect(moved + query, 301);
|
||||
}
|
||||
|
||||
let html;
|
||||
try {
|
||||
html = indexHtml();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue