-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsource.config.ts
42 lines (40 loc) · 1021 Bytes
/
source.config.ts
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
import { remarkMermaid } from "@theguild/remark-mermaid";
import {
rehypeCodeDefaultOptions,
remarkAdmonition,
} from "fumadocs-core/mdx-plugins";
import { remarkInstall } from "fumadocs-docgen";
import {
defineCollections,
defineConfig,
defineDocs,
frontmatterSchema,
} from "fumadocs-mdx/config";
import { transformerTwoslash } from "fumadocs-twoslash";
import { z } from "zod";
export const docs = defineDocs({
dir: "content/docs",
});
export default defineConfig({
mdxOptions: {
remarkPlugins: [remarkInstall, remarkAdmonition, remarkMermaid],
rehypeCodeOptions: {
themes: {
light: "github-light",
dark: "github-dark",
},
transformers: [
...(rehypeCodeDefaultOptions.transformers ?? []),
transformerTwoslash(),
],
},
},
});
export const blogPosts = defineCollections({
type: "doc",
dir: "content/release-notes",
schema: frontmatterSchema.extend({
author: z.string(),
date: z.string().date().or(z.date()),
}),
});