Add per-page search metadata, link previews and a sitemap

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>
This commit is contained in:
Zaldimmar 2026-09-27 21:21:10 -05:00
parent 71a470b66f
commit 64cb2ec56a
21 changed files with 777 additions and 29 deletions

View file

@ -23,7 +23,7 @@
broken server.
═══════════════════════════════════════════════════════════════ */
import type { ReactNode } from 'react'
import { useEffect, type ReactNode } from 'react'
import HeroStage from './sections/home/HeroStage.tsx'
import NextEventCountdown from './sections/home/NextEventCountdown.tsx'
@ -33,6 +33,7 @@ import StatsBand from './sections/home/StatsBand.tsx'
import FeaturedBand from './sections/home/FeaturedBand.tsx'
import FeaturedTimelineRail from './sections/home/FeaturedTimelineRail.tsx'
import Pathfinder from './sections/home/Pathfinder.tsx'
import { documentTitle } from '../lib/site.ts'
import {
useFrontPage,
type FrontPage,
@ -104,6 +105,11 @@ const SECTIONS: Record<
export default function Home() {
const { data: page, error, reload } = useFrontPage()
// Back to the site name when a visitor returns here from a page.
useEffect(() => {
document.title = documentTitle()
}, [])
return (
<>
<HeroStage hero={page?.hero ?? null} />