Blog
This commit is contained in:
+18
-3
@@ -1,10 +1,15 @@
|
||||
import { defineConfig, defineDocs } from 'fumadocs-mdx/config';
|
||||
import { metaSchema, pageSchema } from 'fumadocs-core/source/schema';
|
||||
import {
|
||||
defineCollections,
|
||||
defineConfig,
|
||||
defineDocs,
|
||||
} from "fumadocs-mdx/config";
|
||||
import { metaSchema, pageSchema } from "fumadocs-core/source/schema";
|
||||
import { z } from "zod";
|
||||
|
||||
// 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',
|
||||
dir: "content/docs",
|
||||
docs: {
|
||||
schema: pageSchema,
|
||||
postprocess: {
|
||||
@@ -16,6 +21,16 @@ export const docs = defineDocs({
|
||||
},
|
||||
});
|
||||
|
||||
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: {
|
||||
// MDX options
|
||||
|
||||
Reference in New Issue
Block a user