Skip to content

Commit ee48c8c

Browse files
committed
fix: update frontmatter schema for docs and meta
1 parent 3e14458 commit ee48c8c

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

apps/developer-hub/source.config.ts

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,24 @@
1-
import {
2-
defineConfig,
3-
defineDocs,
4-
frontmatterSchema,
5-
metaSchema,
6-
} from "fumadocs-mdx/config";
1+
import { defineConfig, defineDocs } from "fumadocs-mdx/config";
72
import { z } from "zod";
83

94
export const docs = defineDocs({
105
docs: {
11-
schema: frontmatterSchema.extend({
6+
schema: z.object({
7+
title: z.string(),
8+
description: z.string(),
9+
icon: z.string().optional(),
10+
full: z.boolean().default(false),
1211
index: z.boolean().default(false),
1312
}),
1413
},
1514
meta: {
16-
schema: metaSchema.extend({
15+
schema: z.object({
16+
title: z.string().optional(),
17+
pages: z.array(z.string()).optional(),
1718
description: z.string().optional(),
19+
root: z.boolean().optional(),
20+
defaultOpen: z.boolean().optional(),
21+
icon: z.string().optional(),
1822
}),
1923
},
2024
});

0 commit comments

Comments
 (0)