[READ-ONLY] Mirror of https://github.com/flo-bit/tiny-docs. quick setup, simple, minimalistic docs for your github project
flo-bit.dev/tiny-docs/
1import { defineCollection, z } from "astro:content";
2import { glob } from 'astro/loaders';
3
4export const docsSchema = z.object({
5 title: z.string().optional(),
6
7 description: z.string().optional(),
8
9 shortDescription: z.string().optional(),
10});
11
12const docs = defineCollection({
13 loader: glob({
14 pattern: ["docs/**/[^_]*.{md,mdx}", "*([Rr][Ee][Aa][Dd][Mm][Ee]).{md,mdx}"],
15 base: "../",
16 }),
17 // Type-check frontmatter using a schema
18 schema: docsSchema,
19});
20
21export const collections = { docs };