-
Notifications
You must be signed in to change notification settings - Fork 25
/
nuxt.config.ts
120 lines (119 loc) · 2.44 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
import type { NitroConfig } from 'nitropack'
import packagesRedirects from './config/packages-redirects'
export default defineNuxtConfig({
runtimeConfig: {
public: {
// Use a flag to merge the PRs quickly without pushing it to the production
learn: false,
},
},
app: {
head: {
htmlAttrs: {
dir: 'ltr',
class: 'scroll-smooth',
},
meta: [
{ name: 'theme-color', content: '#ECDC5A' },
],
templateParams: {
separator: '·',
},
},
},
modules: [
'@nuxtjs/seo',
'@nuxt/content',
'@nuxt/ui',
'@vueuse/nuxt',
'@nuxtjs/plausible',
'nuxt-payload-analyzer',
'@nuxt/fonts',
],
css: [
'~/assets/app.css',
],
ui: {
icons: ['heroicons', 'simple-icons', 'vscode-icons', 'ph'],
},
nitro: {
static: true,
prerender: {
failOnError: true,
crawlLinks: true,
routes: ['/', '/blog', '/packages', '/blog/categories', '/api/search.txt', '/api/content/packages.json', '/rss.xml', '/blog/rss.xml'],
ignore: [
'/packages/</span',
'/packages/template',
'/packages/src/runtime',
],
},
routeRules: {
'/blog/2023-08-25-nitro-2.6': {
redirect: {
statusCode: 301,
to: '/blog/2023-08-25-nitro-2-6',
},
},
// TODO: Related to public.learn flag
'/learn/**': { robots: false },
},
},
content: {
documentDriven: false,
highlight: {
theme: {
default: 'github-light',
dark: 'github-dark',
},
},
experimental: {
cacheContents: false,
},
},
colorMode: {
preference: 'dark',
},
ogImage: {
fonts: [
'Nunito:400',
'Nunito:700',
],
},
site: {
url: 'https://unjs.io',
name: 'UnJS',
description: 'Agnostic Excellence: JavaScript Libraries, Tools, and Utilities, Crafted to Elevate Your Coding Journey.',
},
schemaOrg: {
identity: {
name: 'UnJS',
type: 'Organization',
logo: 'https://unjs.io/favicon.svg',
sameAs: [
'https://github.com/unjs',
'https://twitter.com/unjsio',
],
},
},
seo: {
splash: false,
},
linkChecker: {
enabled: false,
},
plausible: {
autoPageviews: false,
},
routeRules: {
...packagesRedirects as NitroConfig['routeRules'],
},
devtools: {
enabled: true,
},
typescript: {
tsConfig: {
exclude: ['../bin/**/*'],
},
},
})