-
Notifications
You must be signed in to change notification settings - Fork 0
/
nuxt.config.js
355 lines (354 loc) · 8.75 KB
/
nuxt.config.js
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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
import { defineNuxtConfig } from 'nuxt/config'
// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
compatibilityDate: '2024-04-03',
env: {
NUXT_SITE_ENV: process.env.NUXT_SITE_ENV,
NUXT_PUBLIC_GTAG_ID: process.env.NUXT_PUBLIC_GTAG_ID
},
/*
** Enabling devtools in production
** See https://nuxt.com/modules/devtools
*/
devtools: { enabled: process.env.NUXT_SITE_ENV !== 'production' },
/*
** Nuxt rendering mode
** See https://nuxtjs.org/api/configuration-mode
*/
mode: 'universal',
/*
** Nuxt target
** See https://nuxtjs.org/api/configuration-target
*/
target: 'static',
/*
** Nuxt server configuration
*/
app: {
// https://nuxt.com/docs/getting-started/transitions
pageTransition: { name: 'test' }
},
/*
** Nuxt SEO
** See https://nuxtseo.com/nuxt-seo/guides/configuring-modules
*/
site: {
url: 'https://jesusgarciavaladez.dev',
name: 'Jesus Garcia Valadez | Portfolio',
description: 'Welcome to my portfolio!',
defaultLocale: 'en', // not needed if you have @nuxtjs/i18n installed
indexable: process.env.NUXT_SITE_ENV === 'production',
trailingSlash: true
},
/*
** Headers of the page
** See https://nuxtjs.org/api/configuration-head
*/
head: {
title: process.env.npm_package_name || '',
meta: [
{ charset: 'utf-8' },
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
{
hid: 'description',
name: 'description',
content: process.env.npm_package_description || ''
}
],
link: [
{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' },
{ rel: 'stylesheet', type: 'https://rsms.me/inter/inter.css' }
]
},
/**
* Robots module configuration
* See https://github.com/nuxt-community/robots-module#options
*/
robots: {
/**
* Should a `<meta name="robots" content="<>">` tag be added to the head.
*
* @default boolean
*/
metaTag: false,
/**
* Should route rules which disallow indexing be added to the `/robots.txt` file.
*
* @default boolean
*/
disallowNonIndexableRoutes: true,
/**
* Specify a robots.txt path to merge the config from, relative to the root directory.
*
* When set to `true`, the default path of `<publicDir>/robots.txt` will be used.
*
* When set to `false`, no merging will occur.
*
* @default boolean | string
*/
mergeWithRobotsTxtPath: false,
/**
* Blocks bots that don't benefit our SEO and are known to cause issues.
*
* @default boolean
*/
blockNonSeoBots: true,
disallow: ['/'],
/**
* Define more granular rules for the robots.txt. Each stack is a set of rules for specific user agent(s).
*
* @default []
* @example [
* {
* userAgents: ['AdsBot-Google-Mobile', 'AdsBot-Google-Mobile-Apps'],
* disallow: ['/admin'],
* allow: ['/admin/login'],
* },
* ]
*/
groups: [
{
userAgent: [
// Google
'AdsBot-Google-Mobile',
'AdsBot-Google-Mobile-Apps',
'AdsBot-Google',
'Googlebot',
'Googlebot-Image',
'Googlebot-News',
'Googlebot-Video',
'Google-InspectionTool',
'GoogleOther',
'GoogleOther-Image',
'GoogleOther-Video',
'Google-Extended',
'Storebot-Google',
// DuckDuckGo
'DuckDuckBot',
// Bing
'Bingbot',
'msnbot',
'adidxbot',
// Meta
'Metabot',
'Facebot',
'FacebookBot',
'FacebookExternalHit',
'WhatsApp',
// Twitter
'Twitterbot',
// LinkedIn
'LinkedInBot',
// Pinterest
'Pinterest',
// Slack
'Slackbot',
// Apple
'Applebot',
// Telegram
'TelegramBot',
// Yahoo
'Slurp',
// Exabot (Francia)
'Exabot',
// Qwantify (Francia)
'Qwantify',
// AhrefsBot
'AhrefsBot',
// SEMrushBot
'SEMrushBot',
// MJ12bot
'MJ12bot'
],
disallow: ['/form']
}
],
credits: false,
},
/*
** Global CSS
*/
css: ['~/assets/css/main.css'],
/*
** Plugins to load before mounting the App
** https://nuxtjs.org/guide/plugins
*/
plugins: [],
/*
** Auto import components
** See https://nuxtjs.org/api/configuration-components
*/
components: true,
/*
** Nuxt.js modules
*/
modules: [
// https://nuxt.com/modules/i18n
'@nuxtjs/i18n',
// https://eslint.nuxt.com/packages/module
'@nuxt/eslint',
// https://pinia.vuejs.org/ssr/nuxt.html
'@pinia/nuxt',
// https://nuxt.com/modules/gtag
'nuxt-gtag',
// https://fonts.nuxt.com/get-started/installation
'@nuxt/fonts',
// https://nuxt.com/modules/purgecss
'nuxt-purgecss',
// https://nuxt.com/modules/headlessui
'nuxt-headlessui',
// https://nuxt.com/modules/storyblok
'@storyblok/nuxt',
// https://nuxt.com/modules/partytown
'@nuxtjs/partytown',
// https://nuxt.com/modules/tailwindcss
'@nuxtjs/tailwindcss',
// https://auto-animate.formkit.com/#usage-vue
'@formkit/auto-animate/nuxt',
// https://image.nuxt.com/get-started/installation
'@nuxt/image',
// https://nuxt.com/docs/getting-started/testing
'@nuxt/test-utils/module',
// https://color-mode.nuxtjs.org/
'@nuxtjs/color-mode'
],
/**
** Gtag configuration
** See https://nuxt.com/modules/gtag
*/
gtag: {
id: process.env.NUXT_PUBLIC_GTAG_ID,
// Additional configuration for this tag ID
config: {
page_title: 'My Custom Page Title'
}
},
/*
** Build configuration
** See https://storybook.nuxtjs.org/getting-started/setup
*/
storybook: {
// Options
url: 'http://localhost:6006',
port: 6006
},
/*
** PurgeCSS configuration
** See https://nuxt.com/modules/purgecss
*/
purgecss: {
enabled: true, // Always enable purgecss
safelist: [] // Add my-class token to the safelist (e.g. .my-class)
},
/**
** Headless UI configuration
** See https://nuxt.com/modules/headlessui
*/
headlessui: {
prefix: 'Headless' // Optionally change the default prefix.
},
/**
** Storyblok configuration
** See https://nuxt.com/modules/storyblok
*/
storyblok: {
accessToken: "<your-access-token>",
bridge: true,
devtools: true
},
/**
** Partytown configuration
** See https://nuxt.com/modules/partytown
*/
partytown: {
/**
* When `true`, Partytown scripts are not minified. See https://partytown.builder.io/configuration
* on how to enable more logging.
*
* @default true in development
*/
debug: process.env.NUXT_SITE_ENV === 'development',
/**
* Path (relative to your base URL) where the Partytown library should be served from.
*
* @default '~partytown'
*/
lib: '~partytown'
// For other options, see https://partytown.builder.io/configuration
},
/**
** i18n configuration
** See https://i18n.nuxtjs.org/docs/guide
*/
i18n: {
baseUrl: 'https://jesusgarciavaladez.dev',
strategy: 'prefix_except_default',
lazy: true,
langDir: 'lang',
defaultLocale: 'en',
locales: [
{
code: 'en',
iso: 'en-US',
file: 'en-US.ts'
},
{
code: 'es',
iso: 'es-ES',
file: 'es-ES.ts'
}
]
},
/**
** ESLint configuration
** See https://nuxt.com/modules/eslint-module
*/
eslint: {
cache: true,
include: [
'components/**/*.vue',
'layouts/**/*.vue',
'pages/**/*.vue',
'plugins/**/*.vue',
'nuxt.config.js',
'/**/*.{js,jsx,ts,tsx,vue}'
],
emitWarning: true,
emitError: true,
failOnWarning: false,
failOnError: false,
checker: true
},
/**
** Nuxt Image configuration
** See https://image.nuxt.com/get-started/installation
*/
image: {
dir: 'assets/images'
},
/**
** Nuxt Test Utils configuration
** See https://nuxt.com/docs/getting-started/testing
*/
test: {
environment: 'nuxt'
},
/**
** Nuxt Color Mode configuration
** See https://color-mode.nuxtjs.org/
*/
colorMode: {
preference: 'system', // default value of $colorMode.preference
fallback: 'light', // fallback value if not system preference found
hid: 'nuxt-color-mode-script',
globalName: '__NUXT_COLOR_MODE__',
componentName: 'ColorScheme',
classPrefix: '',
classSuffix: '-mode',
storageKey: 'nuxt-color-mode'
},
router: {
linkActiveClass: '',
linkExactActiveClass: ''
}
})