Remove website modal and use cookbook detail routes (#2312)

- replace cookbook recipe/example modal views with dedicated detail pages
- add legacy #file cookbook hash redirects to canonical routes
- remove modal component/runtime and associated CSS and stale page references

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: ca1a64ec-678f-45ac-ba68-33a37717398a
This commit is contained in:
Aaron Powell
2026-07-16 15:17:05 +10:00
committed by GitHub
parent 5ff8276add
commit 1a77b83008
9 changed files with 322 additions and 2185 deletions
@@ -42,9 +42,7 @@ const TYPE_PAGES: Record<string, string> = {
};
// Resource types that have a dedicated detail page at /<type>/<id>/. Search
// results for these should deep-link to the canonical detail page rather than
// the listing page with an inert #file= hash (listing pages no longer open a
// modal from that hash).
// results for these should deep-link to the canonical detail page.
const DETAIL_ROUTE_TYPES = new Set([
"agent",
"instruction",
@@ -118,9 +116,7 @@ export default function pagefindResources(): AstroIntegration {
const url = hasDetailPage
? `${base}${record.type}/${encodeURIComponent(record.id)}/`
: `${base}${typePage.slice(1)}#file=${encodeURIComponent(
record.path
)}`;
: `${base}${typePage.slice(1)}`;
const typeLabel = TYPE_LABELS[record.type] || record.type;
const addResult = await index.addCustomRecord({