-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnuxt.config.ts
131 lines (125 loc) · 3.5 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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
// https://nuxt.com/docs/api/configuration/nuxt-config
import { defineNuxtConfig } from 'nuxt/config';
import { resolve } from 'path';
export default defineNuxtConfig({
compatibilityDate: '2024-04-03',
devtools: { enabled: true },
devServer: { port: 3000, host: '0.0.0.0' },
ssr: true,
app: {
// head
head: {
title: "Neil's blog",
meta: [
{
name: 'viewport',
content: 'width=device-width, initial-scale=1',
},
{
hid: 'description',
name: 'description',
content: "Neil's blog",
},
],
link: [{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }],
},
},
modules: [
'@nuxtjs/tailwindcss',
'nuxt-icons',
'@vueuse/nuxt',
'@pinia/nuxt',
'@nuxtjs/color-mode',
'@nuxt/icon',
'@nuxt/content',
'@nuxt/image',
'nuxt-anchorscroll',
],
css: ['@/assets/style/tailwind.scss'],
postcss: {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
},
// @nuxt/icon for iconify
icon: {
serverBundle: {
collections: ['uil', 'mdi'], // <!--- this
},
},
typescript: {
strict: true,
shim: false,
},
// vueuse
vueuse: {
ssrHandlers: true,
},
// colorMode
colorMode: {
classSuffix: '',
preference: 'system',
fallback: 'dark',
},
// content
content: {
documentDriven: true,
api: {
baseURL: '/api/_content',
},
sources: {
content: {
driver: 'fs',
prefix: '/articles',
base: resolve(__dirname, 'content'),
},
// github: {
// prefix: '/blog', // Prefix for routes used to query contents
// driver: 'github', // Driver used to fetch contents (view unstorage documentation)
// repo: 'yimincai/articles', // Repository of the project
// branch: 'main',
// dir: 'docs', // Directory where contents are located. It could be a subdirectory of the repository.
// // Imagine you have a blog inside your content folder. You can set this option to `content/blog` with the prefix option to `/blog` to avoid conflicts with local files.
// },
},
highlight: {
// Theme used in all color schemes.
// OR
theme: {
// Default theme (same as single string)
default: 'github-light-default',
// Theme used if `html.dark`
dark: 'github-dark',
},
langs: [
'json',
'js',
'ts',
'html',
'css',
'vue',
'shell',
'mdc',
'md',
'yaml',
'xml',
'go',
'php',
'python',
'java',
'ruby',
'csharp',
'cpp',
'swift',
'kotlin',
'rust',
'scala',
'perl',
'sql',
'dockerfile',
],
},
},
routeRules: { '/': { prerender: true } },
});