-
Notifications
You must be signed in to change notification settings - Fork 50
Expand file tree
/
Copy pathsource.config.ts
More file actions
117 lines (111 loc) · 2.67 KB
/
source.config.ts
File metadata and controls
117 lines (111 loc) · 2.67 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
import { fileGenerator, remarkDocGen } from "fumadocs-docgen";
import { defineConfig, defineDocs, frontmatterSchema } from "fumadocs-mdx/config";
import { remarkFigmaImage } from "./components/figma-image/remark-figma-image";
import { typeTableGenerator } from "./components/type-table/generator";
import { remarkReactTypeTable } from "./components/type-table/remark-react-type-table";
import lastModified from "fumadocs-mdx/plugins/last-modified";
import z from "zod";
import { env } from "@/app/env";
export const docs = defineDocs({
dir: "content/docs",
docs: {
async: true,
schema: frontmatterSchema.extend({
deprecated: z.string().optional(),
coverImageFigmaId: z.string().optional(),
}),
postprocess: {
includeProcessedMarkdown: true,
},
},
});
export const reactDocs = defineDocs({
dir: "content/react",
docs: {
async: true,
schema: frontmatterSchema.extend({
deprecated: z.string().optional(),
}),
postprocess: {
includeProcessedMarkdown: true,
},
},
});
export const breezeDocs = defineDocs({
dir: "content/breeze",
docs: {
async: true,
schema: frontmatterSchema.extend({
deprecated: z.string().optional(),
}),
postprocess: {
includeProcessedMarkdown: true,
},
},
});
export const lynxDocs = defineDocs({
dir: "content/lynx",
docs: {
async: true,
schema: frontmatterSchema.extend({
deprecated: z.string().optional(),
}),
postprocess: {
includeProcessedMarkdown: true,
},
},
});
export const aiIntegrationDocs = defineDocs({
dir: "content/ai-integration",
docs: {
async: true,
schema: frontmatterSchema.extend({
deprecated: z.string().optional(),
}),
postprocess: {
includeProcessedMarkdown: true,
},
},
});
export default defineConfig({
plugins: [lastModified()],
mdxOptions: {
remarkNpmOptions: {
persist: {
id: "package-manager",
},
},
remarkPlugins: [
[remarkDocGen, { generators: [fileGenerator()] }],
[
remarkReactTypeTable,
{
generator: typeTableGenerator,
options: {
parseDescriptionAsMarkdown: true,
},
},
],
[
remarkFigmaImage,
{
fileKey: env.figmaFileKey,
accessToken: env.figmaPersonalAccessToken,
fetchUrlsOptions: {
format: "png",
scale: 2,
},
},
],
],
rehypeCodeOptions: {
lazy: true,
langs: ["ts", "js", "html", "tsx", "mdx"],
inline: "tailing-curly-colon",
themes: {
light: "github-light",
dark: "github-dark",
},
},
},
});