forked from zitadel/zitadel
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsource.config.ts
More file actions
69 lines (65 loc) · 1.88 KB
/
Copy pathsource.config.ts
File metadata and controls
69 lines (65 loc) · 1.88 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
// Suppress MaxListenersExceededWarning from fumadocs-mdx internal concurrency
if (typeof process !== 'undefined') {
process.setMaxListeners(30);
}
import {
defineConfig,
defineDocs,
frontmatterSchema,
metaSchema,
} from 'fumadocs-mdx/config';
import { z } from 'zod';
// @ts-ignore
import remarkHeadingId from 'remark-heading-id';
// You can customise Zod schemas for frontmatter and `meta.json` here
// see https://fumadocs.dev/docs/mdx/collections
export const docs = defineDocs({
dir: 'content',
docs: {
schema: frontmatterSchema.extend({
sidebar_label: z.string().optional(),
}),
files: ['**/*.md', '**/*.mdx', '!v*/**/*', '!**/_*'], // Exclude versioned folders at root and partials
postprocess: {
includeProcessedMarkdown: true,
},
},
meta: {
schema: metaSchema,
files: ['**/meta.json', '!v*/**'],
},
});
export const versions = defineDocs({
dir: 'content',
docs: {
schema: frontmatterSchema.extend({
sidebar_label: z.string().optional(),
}),
files: ['v*/**/*.md', 'v*/**/*.mdx', '!**/_*'], // Include only versioned folders from content
},
meta: {
schema: metaSchema,
files: ['v*/meta.json', 'v*/**/meta.json'],
},
});
export default defineConfig({
mdxOptions: {
remarkPlugins: [[remarkHeadingId, { defaults: true }]],
rehypeCodeOptions: {
themes: {
light: 'github-light',
dark: 'github-dark',
},
langs: ['json', 'yaml', 'bash', 'sh', 'shell', 'http', 'nginx', 'dockerfile', 'go', 'python', 'javascript', 'typescript', 'tsx', 'jsx', 'css', 'html', 'csharp', 'java', 'xml', 'sql', 'properties', 'ini', 'diff', 'markdown', 'mdx'],
// Map unknown languages to text or similar
langAlias: {
'env': 'bash',
'curl': 'bash',
'caddy': 'nginx',
'conf': 'nginx',
'HTTP': 'http',
'JSON': 'json',
},
},
},
});