-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathnuxt.config.ts
More file actions
89 lines (88 loc) · 2.32 KB
/
nuxt.config.ts
File metadata and controls
89 lines (88 loc) · 2.32 KB
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
// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
extends: [process.env.NUXT_UI_PRO_PATH || '@nuxt/ui-pro'],
modules: [
'@nuxt/content',
'@nuxt/image',
'@nuxt/ui',
'@nuxt/fonts',
'@nuxthq/studio',
'@vueuse/nuxt',
'nuxt-og-image',
'@nuxtjs/i18n',
'@nuxtjs/turnstile',
],
compatibilityDate: '2024-08-06',
hooks: {
// Define `@nuxt/ui` components as global to use them in `.md` (feel free to add those you need)
'components:extend': (components) => {
const globals = components.filter((c) => ['UButton'].includes(c.pascalName))
globals.forEach((c) => c.global = true)
}
},
ui: {
icons: ['heroicons', 'simple-icons', 'ic', 'mdi', 'icon-park-outline', 'octicon', 'carbon', 'ep', 'uil', 'eos-icons', 'vaadin', 'fluent', 'ri', 'material-symbols', 'gg', 'ic', 'circle-flags', 'iconoir', 'logos', 'cib', 'ph', 'map', 'hugeicons', 'oui', 'solar', 'tdesign']
},
routeRules: {
'/api/search.json': { prerender: true },
'/en/docs': { redirect: '/en/docs/getting-started', prerender: false },
'/fr/docs': { redirect: '/fr/docs/getting-started', prerender: false },
'/': { redirect: '/fr', prerender: true },
'/**': { prerender: true },
'/fr': { prerender: true },
'/fr/**': { prerender: true },
},
devtools: {
enabled: true,
componentInspector: false,
},
i18n: {
vueI18n: './i18n.config.ts',
locales: [
{
name: 'Français',
code: 'fr',
language: 'fr-FR',
file: 'fr-FR.js'
},
// {
// name: 'English',
// code: 'en',
// iso: 'en-US',
// file: 'en-US.js'
// }
],
langDir: 'lang',
strategy: 'prefix_and_default',
detectBrowserLanguage: false,
defaultLocale: 'fr'
},
runtimeConfig: {
public: {
turnstile: {
siteKey: process.env.NUXT_PUBLIC_TURNSTILE_SITE_KEY,
},
},
turnstile: {
secretKey: process.env.NUXT_TURNSTILE_SECRET_KEY,
},
},
colorMode: {
preference: 'light',
fallback: 'light',
},
nitro: {
// static: true, // Don't make it static, it breaks some icons
prerender: {
crawlLinks: true,
failOnError: false,
},
},
image: {
provider: 'ipx',
static: {
maxAge: 86400,
public: true,
},
},
})