-
Notifications
You must be signed in to change notification settings - Fork 7
/
nuxt.config.ts
96 lines (94 loc) · 2.13 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
88
89
90
91
92
93
94
95
96
import { componentResolver } from '@chakra-ui/vue-auto-import';
import Components from 'unplugin-vue-components/vite';
import { siteLang, siteName } from './config/site-config';
import * as iconSet from './utils/icons';
import extendedTheme from './theme';
const { extendedIcons: extend, ...library } = iconSet;
export default defineNuxtConfig({
nitro: {
prerender: {
routes: [
'/',
'/getting-started',
'/getting-started/installation',
'/getting-started/nuxt',
'/getting-started/design-principles',
'/styled-system',
'/styled-system/responsive-styles',
'/components/accordion',
'/components/alert',
'/components/avatar',
'/components/checkbox',
'/components/tag',
'/sitemap.xml'
]
},
serveStatic: true
},
app: {
head: {
title: siteName,
htmlAttrs: {
lang: siteLang
},
link: [{ rel: 'icon', type: 'image/png', href: '/favicon.ico' }]
}
},
experimental: {
componentIslands: true
},
// @ts-ignore
chakra: {
extendTheme: extendedTheme,
icons: {
library,
extend
}
},
// @ts-ignore
modules: [
'@nuxt/content',
'~/modules/content-chunks.module.ts',
'@chakra-ui/nuxt-next',
'@nuxtjs/fontaine',
'@nuxtjs/html-validator',
'@nuxtjs/robots',
'@nuxthq/studio'
],
fontMetrics: {
fonts: [
'DM Sans',
{
family: 'DM Sans',
src: '@/styles/typography/files/dm-sans-all-400-normal.woff2'
}
]
},
css: ['@/styles/typography/all.css', '~/styles/prism.scss'],
content: {
// documentDriven: true,
markdown: {
toc: { depth: 5, searchDepth: 3 },
// anchorLinks: true,
remarkPlugins: ['remark-prism'],
rehypePlugins: [
'rehype-prism-plus',
[
'rehype-autolink-headings',
{
behavior: 'append',
test: ['h2', 'h3', 'h4'],
properties: { className: ['anchor'] }
}
]
]
}
},
vite: {
plugins: [
Components({
resolvers: [componentResolver]
})
]
}
});