-
Notifications
You must be signed in to change notification settings - Fork 5
/
nuxt.config.ts
168 lines (149 loc) · 3.61 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
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
import { withHttps } from 'ufo'
import { generateSitemap } from './generateSitemap'
import { cookieConfig } from './config'
export default defineNuxtConfig({
extends: ['nuxt-wordpress'],
experimental: {
typedPages: true,
componentIslands: true,
inlineRouteRules: true,
},
typescript: {
shim: false,
},
nitro: {
externals: {
traceInclude: ['./node_modules/vue/server-renderer'],
},
// @nuxtseo/module
prerender: {
crawlLinks: true,
routes: ['/'],
},
},
modules: [
'@nuxtjs/seo',
'@vueuse/nuxt',
'@nuxtjs/tailwindcss',
'@nuxtjs/turnstile',
'@dargmuesli/nuxt-cookie-control',
'nuxt-graphql-middleware',
'nuxt-shiki',
],
runtimeConfig: {
turnstile: {
secretKey: process.env.NUXT_TURNSTILE_SECRET_KEY,
},
gqlHost: process.env.NUXT_GQL_HOST,
gqlToken: process.env.NUXT_GQL_TOKEN,
public: {
siteUrl: process.env.NUXT_PUBLIC_SITE_URL,
siteUrlProd: process.env.NUXT_PUBLIC_SITE_URL_PROD,
wpHost: process.env.NUXT_PUBLIC_WP_HOST,
isProduction: process.env.NODE_ENV === 'production',
isVercelProduction: process.env.VERCEL_ENV === 'production',
calcomUrl: process.env.NUXT_PUBLIC_CALCOM_URL,
openpanelClientId: process.env.NUXT_PUBLIC_OPENPANEL_CLIENT_ID,
// nuxt-wordpress
wordpress: {
baseUrl: withHttps(process.env.NUXT_PUBLIC_WP_HOST || ''),
twicpicsDomain: process.env.NUXT_PUBLIC_TWICPICS_DOMAIN,
twicpicsPaths: [
{
path: '/wordpress-madebyfabian/',
source: withHttps(process.env.NUXT_PUBLIC_WP_HOST || ''),
},
{
path: '/gravatar/',
source: 'https://secure.gravatar.com/',
},
],
},
},
},
app: {
head: {
titleTemplate: `${process.env.NODE_ENV === 'development' ? '⚙️ ' : ''}%s %separator %siteName`,
templateParams: {
separator: '·',
},
link: [
// Favicons
{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' },
{
rel: 'icon',
type: 'image/png',
href: '/favicon-16x16.png',
sizes: '16x16.png',
},
{
rel: 'icon',
type: 'image/png',
href: '/favicon-32x32.png',
sizes: '32x32.png',
},
{
rel: 'apple-touch-icon',
href: '/apple-touch-icon.png',
sizes: '180x180',
},
],
},
pageTransition: { name: 'page', mode: 'out-in' },
},
// @nuxtseo/module
site: {
siteUrl: process.env.NUXT_PUBLIC_SITE_URL,
siteName: 'Fabian Beer',
siteDescription:
'Hej! I am Fabian, a visual product designer and frontend developer, creating high-quality web experiences for your unique needs.',
defaultLocale: 'en-US',
},
// @nuxtseo/module->nuxt-og-omage
ogImage: {
enabled: false,
},
// nuxt-wordpress->@twicpics/components/nuxt3
twicpics: {
domain: process.env.NUXT_PUBLIC_TWICPICS_DOMAIN,
},
// nuxt-link-checker
linkChecker: {
enabled: false,
failOnError: false,
},
// @nuxtjs/sitemap
sitemap: {
autoLastmod: true,
exclude: ['/impressum', '/datenschutz'],
urls: generateSitemap,
},
// @nuxtjs/turnstile
turnstile: {
siteKey: process.env.NUXT_PUBLIC_TURNSTILE_SITE_KEY || '',
},
// @dargmuesli/nuxt-cookie-control
cookieControl: cookieConfig,
// nuxt-graphql-middleware
graphqlMiddleware: {
graphqlEndpoint: process.env.NUXT_GQL_HOST,
codegenConfig: {
// disabled so it generates every type from the schema (not only the ones used in operations).
onlyOperationTypes: false,
},
codegenSchemaConfig: {
urlSchemaOptions: {
headers: {
'Authorization': process.env.NUXT_GQL_TOKEN || '',
},
},
},
},
// nuxt-shiki
shiki: {
theme: 'github-light',
lang: 'typescript',
themes: [],
langs: ['typescript', 'html', 'bash', 'php', 'graphql'],
},
})