-
Notifications
You must be signed in to change notification settings - Fork 0
/
nuxt.config.js
175 lines (157 loc) · 3.82 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
import readingTime from 'reading-time'
import getRoutes from './utils/getRoutes'
export default {
// Target: https://go.nuxtjs.dev/config-target
target: 'static',
// Global page headers: https://go.nuxtjs.dev/config-head
head: {
title: 'Leigh Dinaya | Front-End Developer',
meta: [
{ charset: 'utf-8' },
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
{
hid: 'description',
name: 'description',
content:
'Front-End Developer | Web3 Enthusiast | OSS Advocate | Lifelong Learner',
},
{ name: 'format-detection', content: 'telephone=no' },
],
link: [{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }],
},
// Global CSS: https://go.nuxtjs.dev/config-css
css: ['@/assets/css/tailwind.css', 'animate.css/animate.min.css'],
// Auto import components: https://go.nuxtjs.dev/config-components
components: true,
// Modules for dev and build (recommended): https://go.nuxtjs.dev/config-modules
buildModules: [
// https://go.nuxtjs.dev/eslint
'@nuxtjs/eslint-module',
'@nuxtjs/stylelint-module',
'@nuxt/postcss8',
'@nuxt/image',
'@nuxtjs/tailwindcss',
'@nuxtjs/google-analytics',
],
webfontloader: {
google: {
families: ['Inter:300,700&display=swap'],
},
},
// Modules: https://go.nuxtjs.dev/config-modules
modules: [
// https://go.nuxtjs.dev/pwa
'@nuxtjs/pwa',
// https://go.nuxtjs.dev/content
'@nuxt/content',
'nuxt-speedkit',
'@nuxtjs/color-mode',
'@nuxtjs/sitemap',
],
// PWA module configuration: https://go.nuxtjs.dev/pwa
pwa: {
manifest: {
name: "Leigh's Website",
short_name: "Leigh's Website",
lang: 'en',
description: 'Leigh Dinaya | Web Developer - Tech Enthusiast',
background_color: '#fafafa',
theme_color: '#fafafa',
display: 'standalone',
start_url: '/',
icons: [
{
src: '/favicon.ico',
sizes: '512x512',
type: 'image/x-icon',
},
],
},
},
content: {
markdown: {
prism: {
theme: false,
},
},
},
hooks: {
'content:file:beforeInsert': (document) => {
if (document.extension === '.md') {
document.readingTime = readingTime(document.text)
}
},
},
eslint: { cache: false },
sitemap: {
hostname: process.env.BASE_URL || 'https://leighdinaya.com',
routes() {
return getRoutes()
},
},
colorMode: {
preference: 'light',
fallback: 'light',
classSuffix: '',
},
image: {
provider: 'static',
},
googleAnalytics: {
id: 'UA-156810526-1',
},
speedkit: {
detection: {
performance: true,
browserSupport: true,
},
performanceMetrics: {
device: {
hardwareConcurrency: { min: 2, max: 48 },
deviceMemory: { min: 2 },
},
timing: {
fcp: 800,
dcl: 1200,
},
lighthouseDetectionByUserAgent: false,
},
fonts: [
{
family: 'Inter',
locals: ['Inter'],
fallback: ['Arial', 'sans-serif'],
variances: [
{
style: 'light',
weight: 300,
sources: [{ src: '@/assets/fonts/Inter-Light.ttf', type: 'ttf' }],
},
{
style: 'bold',
weight: 700,
sources: [{ src: '@/assets/fonts/Inter-Bold.ttf', type: 'ttf' }],
},
],
},
],
componentAutoImport: false,
componentPrefix: undefined,
/**
* IntersectionObserver rootMargin for Components and Assets
*/
lazyOffset: {
component: '0%',
asset: '0%',
},
},
// Build Configuration: https://go.nuxtjs.dev/config-build
build: {
postcss: {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
},
},
}