-
Notifications
You must be signed in to change notification settings - Fork 32
Expand file tree
/
Copy pathnuxt.config.ts
More file actions
152 lines (144 loc) · 4.06 KB
/
nuxt.config.ts
File metadata and controls
152 lines (144 loc) · 4.06 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
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
// https://nuxt.com/docs/api/configuration/nuxt-config
import { fileURLToPath } from 'url';
export default defineNuxtConfig({
modules: ['@nuxt/eslint', '@nuxt/image', '@nuxt/ui', '@nuxt/content', '@vueuse/nuxt', '@nuxtjs/sitemap'],
ssr: true,
/*
** Auto-import components
* Doc: https://github.com/nuxt/components
*/
components: {
loader: true,
dirs: [
{
path: './components',
pathPrefix: false,
global: true,
extensions: ['vue'],
},
],
},
devtools: {
enabled: false,
},
app: {
pageTransition: { name: 'page', mode: 'out-in' },
head: {
title: 'Reaparr Docs',
titleTemplate: '%s | Reaparr Docs',
script: [
{
src: 'https://cdnjs.cloudflare.com/ajax/libs/three.js/r134/three.min.js',
defer: true,
},
{
src: 'https://cdn.jsdelivr.net/npm/vanta/dist/vanta.waves.min.js',
defer: true,
},
{
innerHTML: `(function(c,l,a,r,i,t,y){c[a]=c[a]||function(){(c[a].q=c[a].q||[]).push(arguments)};t=l.createElement(r);t.async=1;t.src="https://www.clarity.ms/tag/"+i;y=l.getElementsByTagName(r)[0];y.parentNode.insertBefore(t,y);})(window, document, "clarity", "script", "vixss7ubk1");`,
},
],
noscript: [{ textContent: 'JavaScript is required' }],
meta: [
{
name: 'description',
content: 'Documentation website for the Reaparr project',
},
{ name: 'color-scheme', content: 'dark only' },
{ property: 'og:type', content: 'website' },
{ property: 'og:site_name', content: 'Reaparr Docs' },
{
property: 'og:description',
content: 'Documentation website for the Reaparr project',
},
{ property: 'og:image', content: 'https://reaparr.rocks/og-image.png' },
{ name: 'twitter:card', content: 'summary_large_image' },
{
name: 'twitter:description',
content: 'Documentation website for the Reaparr project',
},
{
name: 'twitter:image',
content: 'https://reaparr.rocks/og-image.png',
},
],
link: [
{ rel: 'icon', type: 'image/svg+xml', href: '/favicon.svg' },
{
rel: 'preload',
as: 'image',
href: '/img/background/background.avif',
type: 'image/avif',
},
],
},
},
css: ['~/assets/css/main.css'],
site: {
url: 'https://reaparr.rocks',
name: 'Reaparr Docs',
},
colorMode: {
preference: 'dark',
fallback: 'dark',
classPrefix: '',
classSuffix: '',
},
alias: {
'@interfaces': fileURLToPath(new URL('./app/types/interfaces/', import.meta.url)),
'@components': fileURLToPath(new URL('./app/components/', import.meta.url)),
'@composables': fileURLToPath(new URL('./app/composables/', import.meta.url)),
},
routeRules: {
'/docs': { redirect: '/docs/getting-started', prerender: false },
},
compatibilityDate: '2024-07-11',
nitro: {
prerender: {
routes: ['/'],
crawlLinks: true,
// Generates /path.html instead of /path/index.html so AWS Amplify can
// serve routes without trailing slashes directly, avoiding 404 on hard refresh.
// See: https://github.com/aws-amplify/amplify-js/issues/14606
autoSubfolderIndex: false,
},
},
eslint: {
config: {
stylistic: {
indent: 2,
semi: true,
arrowParens: true,
blockSpacing: true,
braceStyle: '1tbs',
commaDangle: 'always-multiline',
quotes: 'single',
quoteProps: 'as-needed',
},
},
},
icon: {
serverBundle: {
collections: ['lucide', 'mdi', 'simple-icons'],
},
clientBundle: {
scan: true,
sizeLimitKb: 512,
},
fallbackToApi: false,
fetchTimeout: 0,
},
/*
** Nuxt Image module configuration
*/
image: {
quality: 80,
format: ['avif', 'webp'],
densities: [1, 2],
provider: process.env.NODE_ENV === 'production' ? 'ipxStatic' : 'ipx',
},
sitemap: {
exclude: ['/_ipx/**'],
},
});