-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathnuxt.config.ts
More file actions
145 lines (143 loc) · 4.71 KB
/
nuxt.config.ts
File metadata and controls
145 lines (143 loc) · 4.71 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
import { defineNuxtConfig } from 'nuxt/config'
import variables from './app/utilities/variables'
const SEO = {
TITLE: `Jack Domleo - ${variables.OCCUPATION}`,
DESCRIPTION: `Personal website of Jack Domleo, a ${variables.OCCUPATION.toLowerCase()} specialising in JavaScript-based technologies and web development.`
}
export default defineNuxtConfig({
ssr: true,
app: {
head: {
htmlAttrs: {
lang: 'en-GB'
},
link: [
{ rel: 'shortcut icon', type: 'image/x-icon', href: '/favicon.ico' },
{ rel: 'icon', type: 'image/png', href: '/icon.png' }
],
meta: [
{
// Content-Security-Policy restricts which resources the browser is allowed to load. GitHub Pages does not support custom response headers, so this must be set as a <meta http-equiv> tag instead. Note: frame-ancestors is ignored by browsers when set via a meta tag (it only works as a response header), but all other directives are honoured. Key directives:
// - default-src 'self' → block all resources not explicitly permitted
// - script-src 'unsafe-inline' → required by Nuxt's inline hydration scripts
// - style-src 'unsafe-inline' → required for Vue's scoped style injection
// - frame-ancestors 'none' → prevents this page being embedded in an iframe (clickjacking)
// - base-uri 'self' → prevents <base> tag hijacking
// - form-action 'self' → prevents forms from submitting to external URLs
'http-equiv': 'Content-Security-Policy',
content: "default-src 'self'; img-src 'self' data:; style-src 'self' 'unsafe-inline'; script-src 'self' 'unsafe-inline'; font-src 'self'; frame-ancestors 'none'; base-uri 'self'; form-action 'self'"
},
{
// Referrer-Policy controls how much referrer information is sent with outbound requests. strict-origin-when-cross-origin: sends the full URL for same-origin requests, but only the origin (no path/query) for cross-origin requests, and nothing over HTTP. This prevents leaking page URLs to third-party services via the Referer header.
name: 'referrer',
content: 'strict-origin-when-cross-origin'
}
]
}
},
typescript: {
typeCheck: process.env.NODE_ENV === 'dev',
strict: true
},
css: [
'modern-normalize/modern-normalize.css',
'cooltipz-css/src/cooltipz-classes.scss',
'~/assets/styles/main.scss'
],
site: {
url: 'https://jackdomleo.dev',
name: SEO.TITLE
},
modules: [
'nuxt-seo-utils',
'@nuxtjs/robots',
'nuxt-schema-org',
'@nuxtjs/sitemap',
'@nuxt/content',
'@nuxt/icon'
],
seo: {
meta: {
charset: 'utf-8',
description: SEO.DESCRIPTION,
viewport: {
width: 'device-width',
initialScale: 1,
viewportFit: 'cover'
},
themeColor: [
{ content: '#1b2024', media: '(prefers-color-scheme: dark)' },
{ content: '#fbfaf9', media: '(prefers-color-scheme: light)' },
],
author: 'Jack Domleo',
ogType: 'website',
colorScheme: 'dark light',
formatDetection: 'telephone=no',
ogImage: '/og.png',
ogImageType: 'image/png',
ogImageHeight: 630,
ogImageWidth: 1200,
googleSiteVerification: 'HvfUFnpoWCO9iiPCIT1lfhLf555vptzDdIsBIl2s0BY'
}
},
schemaOrg: {
// Global identity that other schemas can reference
identity: {
type: 'Person',
name: 'Jack Domleo',
url: 'https://jackdomleo.dev',
image: 'https://jackdomleo.dev/me.webp',
jobTitle: variables.OCCUPATION,
worksFor: {
type: 'Organization',
name: 'Ocean Finance',
url: 'https://www.oceanfinance.co.uk'
},
address: {
type: 'PostalAddress',
addressRegion: 'Nottinghamshire',
addressCountry: 'UK'
},
sameAs: [
variables.LINKEDIN_URL,
variables.GITHUB_URL,
variables.CODEPEN_URL
],
knowsAbout: [
'Frontend Engineering',
'Vue.js',
'Nuxt.js',
'TypeScript',
'Web Accessibility (WCAG)',
'Technical Leadership'
]
}
},
content: {
experimental: { sqliteConnector: 'native' }
},
icon: {
customCollections: [
{
prefix: 'custom',
dir: './app/assets/icons'
}
]
},
vite: {
define: {
__VUE_OPTIONS_API__: false,
__VUE_PROD_DEVTOOLS__: false,
__VUE_PROD_HYDRATION_MISMATCH_DETAILS__: false
},
css: {
devSourcemap: true,
preprocessorOptions: {
scss: {
additionalData: '@use "@/assets/styles/scss/variables/responsive.scss" as *;@use "sass:math";'
}
}
}
},
compatibilityDate: '2026-01-21'
})