spb/svgarden Public
SVGarden — searchable bank of 74 self-contained SVG+CSS animation snippets (svgarden.dev)
HTML 79.2%
Astro 10.3%
JavaScript 6%
CSS 3.7%
Shell 0.8%
1/**2 * ============================================================3 * SVGarden — https://www.svgarden.dev4 * Author : Simon-Pierre Boucher5 * Contact: contact@spboucher.ai6 * File : src/pages/search-index.json.js7 * Desc : Build-time endpoint — Fuse.js search index for the whole bank8 * ============================================================9 */10import { loadSnippets } from '../lib/snippets.mjs';1112export async function GET() {13 const snippets = await loadSnippets();14 const index = snippets.map((s) => ({15 slug: s.slug,16 title: s.title,17 category: s.category,18 difficulty: s.difficulty,19 tags: s.tags,20 techniques: s.techniques,21 desc: s.desc,22 }));23 return new Response(JSON.stringify(index), {24 headers: { 'Content-Type': 'application/json' },25 });26}27