-
-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathsource.config.ts
More file actions
51 lines (47 loc) · 1.23 KB
/
source.config.ts
File metadata and controls
51 lines (47 loc) · 1.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
import {
defineConfig,
defineDocs,
frontmatterSchema,
metaSchema,
} from 'fumadocs-mdx/config';
import { remarkAdmonition } from 'fumadocs-core/mdx-plugins';
import { z } from 'zod';
// Extend frontmatter schema to include 'full' property for full-width pages
// and 'redirect_from' for URL redirects
const extendedFrontmatterSchema = frontmatterSchema.extend({
full: z.boolean().default(false),
redirect_from: z.array(z.string()).optional(),
});
// Define the documentation collection
export const docs = defineDocs({
// The root directory for all documentation
dir: 'content/docs',
docs: {
schema: extendedFrontmatterSchema,
postprocess: {
// Only include processed markdown in production (for LLM endpoints)
includeProcessedMarkdown: process.env.NODE_ENV === 'production',
},
},
meta: {
schema: metaSchema,
},
});
// Define the release notes collection
export const releaseNotes = defineDocs({
// The root directory for release notes
dir: 'content/release-notes',
docs: {
schema: frontmatterSchema,
},
meta: {
schema: metaSchema,
},
});
// Configure MDX options
export default defineConfig({
mdxOptions: {
remarkPlugins: [remarkAdmonition],
rehypePlugins: [],
},
});