|
| 1 | +import { remarkDocGen, remarkInstall } from "fumadocs-docgen"; |
1 | 2 | import { defineConfig, defineDocs } from "fumadocs-mdx/config"; |
2 | 3 |
|
3 | 4 | export const { meta, docs } = defineDocs({ |
4 | 5 | dir: "content/docs", |
5 | 6 | }); |
6 | 7 |
|
7 | | -export default defineConfig(); |
8 | | - |
9 | | -// import { defineConfig, defineDocs } from "fumadocs-mdx/config"; |
10 | | -// import { transformerTwoslash } from "fumadocs-twoslash"; |
11 | | -// import { remarkInstall } from "fumadocs-docgen"; |
12 | | - |
13 | | -// export const { docs, meta } = defineDocs({ |
14 | | -// dir: "content/docs", |
15 | | -// // docs: { |
16 | | -// // async: true, |
17 | | -// // }, |
18 | | -// }); |
19 | | - |
20 | | -// export default defineConfig({ |
21 | | -// lastModifiedTime: "git", |
22 | | -// mdxOptions: async () => { |
23 | | -// const { rehypeCodeDefaultOptions } = await import( |
24 | | -// "fumadocs-core/mdx-plugins" |
25 | | -// ); |
26 | | -// return { |
27 | | -// rehypeCodeOptions: { |
28 | | -// lazy: true, |
29 | | -// langs: ["ts", "js", "html"], |
30 | | -// inline: "tailing-curly-colon", |
31 | | -// // themes: { |
32 | | -// // light: "catppuccin-latte", |
33 | | -// // dark: "catppuccin-mocha", |
34 | | -// // }, |
35 | | -// transformers: [ |
36 | | -// ...(rehypeCodeDefaultOptions.transformers ?? []), |
37 | | -// transformerTwoslash(), |
38 | | -// { |
39 | | -// name: "transformers:remove-notation-escape", |
40 | | -// code(hast) { |
41 | | -// for (const line of hast.children) { |
42 | | -// if (line.type !== "element") continue; |
43 | | - |
44 | | -// const lastSpan = line.children.findLast( |
45 | | -// (v) => v.type === "element", |
46 | | -// ); |
47 | | - |
48 | | -// const head = lastSpan?.children[0]; |
49 | | -// if (head?.type !== "text") return; |
50 | | - |
51 | | -// head.value = head.value.replace(/\[\\!code/g, "[!code"); |
52 | | -// } |
53 | | -// }, |
54 | | -// }, |
55 | | -// ], |
56 | | -// }, |
57 | | -// remarkPlugins: [ |
58 | | -// [remarkInstall, { persist: { id: "package-manager" } }], |
59 | | -// ], |
60 | | -// // rehypePlugins: (v) => [rehypeKatex, ...v], |
61 | | -// }; |
62 | | -// }, |
63 | | -// }); |
| 8 | +export default defineConfig({ |
| 9 | + mdxOptions: { |
| 10 | + remarkPlugins: [ |
| 11 | + [remarkDocGen, { generators: [] }], |
| 12 | + remarkInstall, |
| 13 | + ], |
| 14 | + }, |
| 15 | +}); |
0 commit comments