-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnuxt.config.ts
99 lines (81 loc) · 1.89 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
97
98
99
import { isProduction } from 'std-env'
// https://v3.nuxtjs.org/api/configuration/nuxt.config
export default defineNuxtConfig({
components: [
{ path: '~/components/Life', pathPrefix: false },
{ path: '~/components' },
],
// https://nuxt.com/docs/getting-started/configuration
runtimeConfig: {
// https://github.com/harlan-zw/nuxt-simple-sitemap#set-site-url-required-when-prerendering
public: {
siteUrl: 'https://changjun.me',
},
},
// https://devtools.nuxt.com/guide/getting-started
devtools: {
enabled: true,
timeline: {
enabled: true,
},
},
devServer: {
host: '0.0.0.0',
port: 5809,
},
nitro: {
prerender: {
routes: ['/feed.xml', '/feed.json', '/feed.atom', '/life'],
},
},
modules: [
'@vue-macros/nuxt',
'@nuxt/content',
'@unocss/nuxt',
'@vueuse/nuxt',
'dayjs-nuxt',
'@nuxt/devtools',
'@nuxtjs/color-mode',
'@nuxt/image',
],
css: [
'@unocss/reset/tailwind.css',
'@/style/var.css',
'@/style/global.css',
],
// https://vue-macros.sxzz.moe/guide/configurations.html
macros: {},
// https://color-mode.nuxtjs.org/
colorMode: {
preference: 'system',
classSuffix: '',
},
// https://content.nuxtjs.org/api/configuration
content: {
ignores: [isProduction ? '/dev-' : ''],
markdown: {
anchorLinks: false,
},
navigation: {
fields: ['title', 'date', 'image', 'tag', 'description'],
},
documentDriven: {
layoutFallbacks: ['content'],
},
highlight: {
theme: {
dark: 'vitesse-dark',
default: 'vitesse-light',
},
preload: ['diff', 'json', 'js', 'ts', 'css', 'shell', 'html', 'md', 'yaml', 'php', 'vue', 'bash'],
},
},
dayjs: {
plugins: ['relativeTime'],
},
app: {
head: {
viewport: 'width=device-width,initial-scale=1,viewport-fit=cover',
},
},
})