Cleanup of old-data fixes; an editor for the Organization page

Nothing before these changes was ever public, so the fixes kept for
older data go: the /leadership redirect (MOVED in routes/pages.js),
index.html's move of "ngu-" browser keys to "site-", the boot-time
sorting of images from before folders (media.js), and emoji path
icons (a path with no named icon shows a dot; migration 055 turns
the baseline's seeded emoji into their names).

Pages → Organization page (migration 055): a singleton with the
Mission, Vision & Values blocks, the Leadership blocks (a People
block per team, in order) with a heading and blurb, and Volunteering
(title, blurb, links). content_blocks gains the two owner kinds;
GET /organization-page serves it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Zaldimmar 2026-09-30 23:37:35 -05:00
parent 1da79c128b
commit 43797f38bc
14 changed files with 308 additions and 127 deletions

View file

@ -21,9 +21,6 @@
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.
@ -92,23 +89,12 @@ 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();