Something went wrong. Try again.
Experiment to rebuild Diffuse using web applets.
Something went wrong. Try again.
528 B · 19 lines
TypeScript
at main
1234567891011121314151617181920import type { APIRoute } from "astro";import { getCollection } from "astro:content";
// API Routeexport const GET: APIRoute = ({ params, props, request }) => { return new Response(JSON.stringify(props.manifest));};
// Generate static pathsexport async function getStaticPaths() { const manifests = await getCollection("manifests");
return manifests.map((manifest) => { return { params: { manifest: manifest.id.replace("/_manifest", "/manifest") }, props: { manifest: manifest.data }, }; });}