Page requests now go through the API (routes/pages.js), which fills the built index.html in for that path before the app loads: title, description, preview image, canonical URL, and structured data (Organization, Event, BlogPosting). Shared links preview the page itself. Unlisted records are noindex; missing ones return 404. /sitemap.xml lists every public, listed page. site.json is the one place for the site's name, address, default description and preview image, and each static page's title and intro, which the pages now read too. Indexing is switched on: robots.txt allows all but /admin and /api and names the sitemap. The browser tab title follows the page. nginx setup, with a fallback to the plain page if the API is down, is in docs/seo.md. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
124 lines
4.2 KiB
TypeScript
124 lines
4.2 KiB
TypeScript
import PageShell from "../components/PageShell.tsx";
|
|
import { sitePage } from "../lib/site.ts";
|
|
import { useSectionManifest } from "../lib/sections.tsx";
|
|
import EventListCards, { EventCardsToggle } from "./sections/EventList-Cards.tsx";
|
|
|
|
/* Title and intro: site.json, which also gives the search metadata. */
|
|
const PAGE = sitePage("/retreats");
|
|
|
|
/* ═══════════════════════════════════════════════════════════════
|
|
RETREATS PAGE
|
|
|
|
Three bands, all the same view of the same table with a
|
|
different filter. The page declares them and does nothing else —
|
|
each section fetches its own slice.
|
|
|
|
Two filters per band now, and they answer different questions:
|
|
|
|
scope whose gathering it is. event_scopes holds six of
|
|
these; this page draws three.
|
|
type what kind of gathering it is. Pinned to "retreat"
|
|
everywhere on this page, which is what the page is
|
|
for and what lets "Partner" read as a heading rather
|
|
than a catch-all.
|
|
|
|
Because every band is pinned to one type, EventListCards finds a
|
|
single kind in each and draws no type chips. Drop the `type` from
|
|
a band and the chips appear on their own.
|
|
|
|
What this page deliberately does not show: local, international
|
|
and other scopes, and every non-retreat type. Those are reachable
|
|
from their host's page and by URL, and get a band here when
|
|
there's enough of them to fill one — see the block at the bottom.
|
|
|
|
To reorder the page, move a line. To add a different kind of
|
|
section, add an entry with another Component.
|
|
═══════════════════════════════════════════════════════════════ */
|
|
|
|
const CARD_VIEWS = { options: ["carousel", "grid"], Toggle: EventCardsToggle };
|
|
|
|
/* Pinned on every band. Named rather than repeated so turning this
|
|
page into "everything, filtered" later is one deletion. */
|
|
const RETREATS = { type: "retreat" };
|
|
|
|
const SECTIONS = [
|
|
{
|
|
id: "national",
|
|
title: "National Retreats",
|
|
blurb: "Our flagship gatherings, open to young adults across the country.",
|
|
accent: "#138ba0",
|
|
background: "#eef9fb",
|
|
Component: EventListCards,
|
|
props: { scope: "national", ...RETREATS },
|
|
views: { ...CARD_VIEWS, default: "carousel" },
|
|
},
|
|
{
|
|
id: "regional",
|
|
title: "Regional Retreats",
|
|
blurb: "Smaller gatherings hosted by regions throughout the year.",
|
|
accent: "#aac992",
|
|
background: "#ffffff",
|
|
Component: EventListCards,
|
|
props: { scope: "regional", ...RETREATS },
|
|
views: { ...CARD_VIEWS, default: "grid" },
|
|
},
|
|
{
|
|
id: "partner",
|
|
title: "Partner Events",
|
|
blurb: "Retreats hosted by organizations we collaborate with.",
|
|
accent: "#7a5ea8",
|
|
background: "#eef9fb",
|
|
Component: EventListCards,
|
|
props: { scope: "partner", ...RETREATS },
|
|
views: { ...CARD_VIEWS, default: "grid" },
|
|
},
|
|
|
|
/* The other three scopes, ready to uncomment. Each needs an accent
|
|
and a background of its own — those are presentation and live
|
|
here, not in event_scopes.
|
|
|
|
{
|
|
id: "local",
|
|
title: "Local Events",
|
|
blurb: "Hosted by individual chapters.",
|
|
accent: "#d08a3c",
|
|
background: "#ffffff",
|
|
Component: EventListCards,
|
|
props: { scope: "local", ...RETREATS_ONLY },
|
|
views: { ...CARD_VIEWS, default: "grid" },
|
|
},
|
|
{
|
|
id: "international",
|
|
title: "International Events",
|
|
blurb: "Gatherings beyond the US.",
|
|
accent: "#3c7fd0",
|
|
background: "#eef9fb",
|
|
Component: EventListCards,
|
|
props: { scope: "international", ...RETREATS_ONLY },
|
|
views: { ...CARD_VIEWS, default: "grid" },
|
|
},
|
|
{
|
|
id: "other",
|
|
title: "Other Events",
|
|
blurb: "Everything that doesn't fit the categories above.",
|
|
accent: "#7a8a8e",
|
|
background: "#ffffff",
|
|
Component: EventListCards,
|
|
props: { scope: "other", ...RETREATS_ONLY },
|
|
views: { ...CARD_VIEWS, default: "grid" },
|
|
},
|
|
|
|
*/
|
|
];
|
|
|
|
export default function RetreatsPage() {
|
|
const sections = useSectionManifest(SECTIONS);
|
|
|
|
return (
|
|
<PageShell
|
|
title={PAGE.title}
|
|
intro={PAGE.description}
|
|
sections={sections}
|
|
/>
|
|
);
|
|
}
|