Canonical SEO-friendly slug URLs for curated sample trips at /explore/by-slug/<slug>. Resolves slug to a Convex document ID server-side and renders the same <SampleDetailView> as /explore/<id>.
| File | Description |
|---|---|
[slug].astro | /explore/by-slug/<slug> - SSR-fetches sampleTrips:getCuratedBySlug via Convex HTTP; redirects to /explore on missing slug or 404 from Convex; sets 5-min cache + SWR headers; mounts <SampleDetailView sampleId={tripId}> |
[id].astro sibling uses Convex document IDs which are opaque/explore rather than 404 - preserve this behaviortripId (the Convex _id) is resolved at SSR time and passed as sampleId to <SampleDetailView>; the component never re-fetches by slugpublic, max-age=300, stale-while-revalidate=86400) mirrors [id].astro; keep them in syncPUBLIC_CONVEX_URL/api/query with sampleTrips:getCuratedBySlug and falls through return Astro.redirect("/explore") on any failurerequireConsentFromHeaders(Astro.request.headers) passed to <BaseHead> for GDPR-aware analyticssrc/modules/explore/ - SampleDetailView componentsrc/modules/common/utils/geoConsent - requireConsentFromHeadersconvex/sampleTrips.ts - getCuratedBySlug query (called via Convex HTTP)astro, react (SampleDetailView hydrated with client:load)