mirror of
https://github.com/vercel/workflow.git
synced 2026-09-14 19:59:43 +08:00
77 lines
2.0 KiB
TypeScript
77 lines
2.0 KiB
TypeScript
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 page into the shared language selector; the first option is default.
|
|
languageSwitcher: z.array(z.string().min(1)).min(2).optional(),
|
|
// Opt a section landing page out of the card↔nav completeness lint when its
|
|
// `<Cards>` grid is intentionally curated (e.g. links outside the section or
|
|
// deliberately omits children). Exhaustive list pages should use `<AutoCards />`
|
|
// 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/* (v4/current) and /v5/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();
|