UNPKG

synopkg

Version:

Consistent dependency versions in large JavaScript Monorepos

29 lines (25 loc) 988 B
import { defineCollection, z } from 'astro:content'; import { docsLoader } from '@astrojs/starlight/loaders'; import { docsSchema } from '@astrojs/starlight/schema'; import { glob } from 'astro/loaders'; // Not available with legacy API const startPage = 'https://synopkg.github.io/synopkg/guide/getting-started/'; const v13Docs = `https://web.archive.org/web/20250217193908/${startPage}`; const v14 = 'https://github.com/Synopkg/synopkg?tab=readme-ov-file#synopkg'; const banner = `This documentation is for <a href="${v14}">v14 alpha</a>, the <a href="${v13Docs}" rel="external nofollow">docs for v13 stable</a> are archived.`; const schema = docsSchema({ extend: z.object({ banner: z.object({ content: z.string() }).default({ content: banner, }), }), }); export const collections = { docs: defineCollection({ loader: docsLoader(), schema, }), faq: defineCollection({ loader: glob({ pattern: '**/*.mdx', base: './src/faq' }), schema, }), };