import { defineGeistdocsSourceConfig, geistdocsFrontmatterSchema, geistdocsMetaSchema, } from '@vercel/geistdocs/source-config'; import { defineDocs } from 'fumadocs-mdx/config'; import { z } from 'zod'; // You can customise Zod schemas for frontmatter and `meta.json` here // see https://fumadocs.dev/docs/mdx/collections const docsSchema = geistdocsFrontmatterSchema.extend({ // Opt a section landing page out of the card↔nav completeness lint when its // `` grid is intentionally curated (e.g. links outside the section or // deliberately omits children). Exhaustive list pages should use `` // instead, which derives cards from the page tree and can never drift. manualCards: z.boolean().optional(), }); export const v4docs = defineDocs({ dir: 'content/docs/v4', docs: { schema: docsSchema, postprocess: { includeProcessedMarkdown: true, }, }, meta: { schema: geistdocsMetaSchema, }, }); export const v5docs = defineDocs({ dir: 'content/docs/v5', docs: { schema: docsSchema, postprocess: { includeProcessedMarkdown: true, }, }, meta: { schema: geistdocsMetaSchema, }, }); // Canonical World docs rendered at /worlds/* (v5/current) and /v4/worlds/* // (the docs trees only keep the Deploying overview; world pages live outside // the docs, versioned with the same v4/v5 strategy). export const worldsV4Docs = defineDocs({ dir: 'content/worlds/v4', docs: { schema: docsSchema, postprocess: { includeProcessedMarkdown: true, }, }, meta: { schema: geistdocsMetaSchema, }, }); export const worldsV5Docs = defineDocs({ dir: 'content/worlds/v5', docs: { schema: docsSchema, postprocess: { includeProcessedMarkdown: true, }, }, meta: { schema: geistdocsMetaSchema, }, }); export default defineGeistdocsSourceConfig();