-
Notifications
You must be signed in to change notification settings - Fork 0
/
nuxt.config.ts
87 lines (84 loc) · 2.62 KB
/
nuxt.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
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
// https://nuxt.com/docs/api/configuration/nuxt-config
import { fileURLToPath } from 'url'
import { dirname, join } from 'path'
const currentDirLocal = dirname(fileURLToPath(import.meta.url))
// const currentDirProcess = process.cwd()
export default defineNuxtConfig({
devtools: { enabled: true },
ssr: false,
modules: [
'@nuxt/content',
'@nuxt/ui',
// '@nuxt/image', /*'@nuxt/fonts', 'nuxt-og-image',*/
'./modules/addPluginsModule.ts',
'./modules/typedocGenerate.ts'
],
ui: {
disableGlobalStyles: true
},
content: {
// navigation: false,
documentDriven: {
page: true,
surround: true
},
experimental: {
clientDB: true,
search: {
ignoredTags: [ 'style', 'code' ]
},
},
highlight: {
// Theme used in all color schemes.
theme: {
default: 'material-theme',
light: 'material-theme-lighter',
dark: 'material-theme-palenight'
},
preload: [ 'json', 'js', 'ts', 'html', 'css', 'vue', 'diff', 'shell', 'markdown', 'yaml', 'bash', 'ini' ]
},
navigation: {
fields: [ 'icon', 'to', 'target', 'title' ]
}
},
hooks: {
// 'build:before': () => {
// const output = join(currentDirProcess, 'content/docs')
// if (!fs.existsSync(output)) {
// fs.mkdirSync(output, { recursive: true })
// }
// const file = 'README.md'
// const src = join(currentDirProcess, file)
// const dest = join(output, '1.get-started.md')
// fs.copyFileSync(src, dest)
// },
// Define `@nuxt/ui` components as global to use them in `.md` (feel free to add those you need)
'components:extend': (components) => {
const globals = components.filter(c => [
'UButton', 'UIcon', 'Card'
].includes(c.pascalName))
globals.forEach(c => c.global = true)
}
},
routeRules: {
'/docs': {
redirect: '/docs/get-started',
prerender: false
},
'/api-docs': {
redirect: '/api-docs/global',
prerender: false
},
},
uiTypedoc: {
// typesGenerate: true,
// entryPoints: [ join(currentDirProcess, 'test/index.ts') ]
},
// components: {
// global: true,
// },
css: [
join(currentDirLocal, 'assets/css/main.css'),
join(currentDirLocal, 'assets/css/tailwind.css')
]
})