forked from shadcn-ui/registry-template
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsource.config.ts
More file actions
32 lines (30 loc) · 864 Bytes
/
source.config.ts
File metadata and controls
32 lines (30 loc) · 864 Bytes
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
import { defineDocs, defineConfig } from "fumadocs-mdx/config";
import { transformers } from "@/lib/highlight-code";
export default defineConfig({
mdxOptions: {
rehypeCodeOptions: {
themes: {
light: "github-light",
dark: "github-dark",
},
transformers: [
...transformers,
{
pre(node) {
node.properties["class"] =
"no-scrollbar min-w-0 overflow-x-auto px-4 py-3.5 outline-none has-[[data-highlighted-line]]:px-0 has-[[data-line-numbers]]:px-0 has-[[data-slot=tabs]]:p-0 !bg-transparent";
},
code(node) {
node.properties["data-line-numbers"] = "";
},
line(node) {
node.properties["data-line"] = "";
},
},
],
},
},
});
export const docs = defineDocs({
dir: "content/docs",
});