This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // src/pages/api/docs/[lang].json.ts | |
| // Expose Astro Content Collections as locale-aware static JSON endpoints. | |
| // Outputs: /api/docs/en.json and /api/docs/nl.json at build time. | |
| // No SSR or adapter required — works with default static output. | |
| // unlisted entries are included in API but hidden from sidebar. | |
| import type { APIRoute } from 'astro'; | |
| import { getCollection } from 'astro:content'; | |
| export function getStaticPaths() { | |
| return [ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Test |