46 lines
982 B
TypeScript
46 lines
982 B
TypeScript
import {
|
|
defineCollections,
|
|
defineConfig,
|
|
defineDocs,
|
|
} from "fumadocs-mdx/config";
|
|
import { metaSchema, pageSchema } from "fumadocs-core/source/schema";
|
|
import { z } from "zod";
|
|
import mist from "./public/mist.tmLanguage.json";
|
|
|
|
// You can customize Zod schemas for frontmatter and `meta.json` here
|
|
// see https://fumadocs.dev/docs/mdx/collections
|
|
export const docs = defineDocs({
|
|
dir: "content/docs",
|
|
docs: {
|
|
schema: pageSchema,
|
|
postprocess: {
|
|
includeProcessedMarkdown: true,
|
|
},
|
|
},
|
|
meta: {
|
|
schema: metaSchema,
|
|
},
|
|
});
|
|
|
|
export const blogPosts = defineCollections({
|
|
type: "doc",
|
|
dir: "content/blog",
|
|
// add required frontmatter properties
|
|
schema: pageSchema.extend({
|
|
author: z.string(),
|
|
date: z.string().date().or(z.date()),
|
|
}),
|
|
});
|
|
|
|
export default defineConfig({
|
|
mdxOptions: {
|
|
rehypeCodeOptions: {
|
|
langs: [mist],
|
|
themes: {
|
|
light: "github-light",
|
|
dark: "github-dark",
|
|
},
|
|
},
|
|
},
|
|
});
|