forked from zvec-ai/zvec-web
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsource.config.ts
More file actions
51 lines (45 loc) · 1.21 KB
/
Copy pathsource.config.ts
File metadata and controls
51 lines (45 loc) · 1.21 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 { remarkSteps } from 'fumadocs-core/mdx-plugins';
import { metaSchema, pageSchema } from 'fumadocs-core/source/schema';
import {
defineCollections,
defineConfig,
defineDocs,
} from 'fumadocs-mdx/config';
import rehypeKatex from 'rehype-katex';
import remarkDirective from 'remark-directive';
import remarkMath from 'remark-math';
import { z } from 'zod';
// Define docs
export const docs = defineDocs({
dir: 'content/docs',
docs: {
schema: pageSchema.extend({
extendedTitle: z.string().default(''),
pythonApiReference: z.string().default(''),
nodejsApiReference: z.string().default(''),
}),
postprocess: {
includeProcessedMarkdown: true,
},
},
meta: {
schema: metaSchema,
},
});
// Define blog posts
export const blogPosts = defineCollections({
type: 'doc',
dir: 'content/blog',
schema: pageSchema.extend({
date: z.string(),
image: z.string().default(''),
description: z.string().default(''),
}),
});
export default defineConfig({
mdxOptions: {
remarkPlugins: [remarkMath, remarkDirective, remarkSteps],
// Place it at first, it should be executed before the syntax highlighter
rehypePlugins: (v) => [rehypeKatex, ...v],
},
});