chore: track site sources + ignore local env/backups

This commit is contained in:
2026-01-19 11:46:39 +01:00
parent aece8c5526
commit 5eb23a3de4
50 changed files with 3158 additions and 38 deletions

View File

@@ -0,0 +1,22 @@
import type { APIRoute } from "astro";
import { getCollection } from "astro:content";
export const prerender = true;
export const GET: APIRoute = async () => {
const entries = await getCollection("glossaire");
const index = entries.map((e) => ({
slug: e.slug,
term: e.data.term,
aliases: e.data.aliases ?? [],
definitionShort: e.data.definitionShort,
href: `/glossaire/${e.slug}/`,
}));
return new Response(JSON.stringify(index), {
headers: {
"Content-Type": "application/json; charset=utf-8",
"Cache-Control": "public, max-age=3600",
},
});
};