-
Notifications
You must be signed in to change notification settings - Fork 1
/
nuxt.config.ts
171 lines (169 loc) · 4.23 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
169
170
171
const keywords =
'Development, Developer, Software, Engineer, Software Engineer, Engineering, Full-Stack, Freelancer, Experiences, BS, MEng';
const description =
'UK-based Software Engineer (BS, MEng), AWS Certified Solutions Architect Associate and Full-Stack Engineer focused on creating performant and clean experiences.';
const website = {
'@context': 'http://schema.org',
'@type': 'WebSite',
name: 'Gonzalo Hirsch | Software Engineer and Freelancer',
url: 'https://gonzalohirsch.com/',
};
const person = {
'@context': 'http://www.schema.org',
'@type': 'Person',
'@id': 'https://gonzalohirsch.com/#about',
name: 'Gonzalo Hirsch',
alternateName: 'Gonzalo Hirsch',
nationality: 'Argentinian',
alumniOf: [
{
'@type': 'CollegeOrUniversity',
name: 'Instituto Tecnológico de Buenos Aires',
sameAs: 'http://itba.edu.ar/',
},
],
gender: 'Male',
jobTitle: 'Software Engineer',
worksFor: [
{
'@type': 'Organization',
name: 'Toptal',
sameAs: [
'https://www.toptal.com/',
'https://www.linkedin.com/company/toptal',
'https://twitter.com/toptal',
'https://www.facebook.com/toptal',
'https://www.instagram.com/toptal/',
],
},
],
url: 'https://gonzalohirsch.com/',
image: 'https://gonzalohirsch.com/meta-img.webp',
sameAs: [
'https://gonzalohirsch.com/',
'https://github.com/GonzaloHirsch',
'https://www.linkedin.com/in/gonzalo-hirsch/',
'https://www.instagram.com/gonzalohirsch/?hl=en',
'https://www.toptal.com/resume/gonzalo-hirsch',
],
};
const logos = {
'@context': 'http://www.schema.org',
'@type': 'Organization',
url: 'https://gonzalohirsch.com/',
logo: 'https://gonzalohirsch.com/logo.webp',
email: '[email protected]',
name: 'Gonzalo Hirsch | Software Engineer and Freelancer',
description: description,
founder: person,
keywords: keywords,
};
const jsonLds = [website, person, logos];
// Sitemap
const blogPageCount = 5;
const routes: String[] = ['/'];
for (let i = 1; i <= blogPageCount; i++) {
routes.push(`/blog/page/${i}/` as string);
}
export default defineNuxtConfig({
modules: [
'@nuxtjs/tailwindcss',
'@nuxt/content',
'@nuxtjs/color-mode',
'@nuxt/image',
'nuxt-delay-hydration',
],
delayHydration: {
mode: 'manual',
debug: process.env.NODE_ENV === 'development',
},
colorMode: {
classSuffix: '',
preference: 'light',
fallback: 'light',
},
css: ['/assets/css/main.css'],
ssr: true,
generate: {
routes: routes,
},
// Sitemap
// https://content.nuxtjs.org/guide/recipes/sitemap/
nitro: {
prerender: {
routes: ['/sitemap.xml', '/rss.xml'],
},
},
experimental: {
payloadExtraction: false,
},
router: {
options: {
strict: false,
},
},
app: {
head: {
htmlAttrs: {
lang: 'en',
},
title: 'Gonzalo Hirsch | Software Engineer and Freelancer',
meta: [
{ charset: 'utf-8' },
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
{
hid: 'keywords',
name: 'keywords',
content: keywords,
},
{
hid: 'author',
name: 'author',
content: 'Gonzalo Hirsch',
},
],
link: [{ rel: 'icon', type: 'image/png', href: '/favicon.png' }],
script: jsonLds.map((elem) => {
return {
type: 'application/ld+json',
children: JSON.stringify(elem),
};
}),
},
},
sourcemap: false,
// Inspired on https://blog.openreplay.com/power-your-blog-with-nuxt-content
content: {
// experimental: {
// clientDB: true,
// stripQueryParameters: false,
// },
// https://content.nuxtjs.org/api/configuration
highlight: {
theme: 'github-dark',
preload: [
'java',
'javascript',
'typescript',
'bash',
'python',
'html',
'yaml',
'hcl',
'docker',
],
},
markdown: {
// https://github.com/rehypejs/rehype-external-links
rehypePlugins: [
[
'rehype-external-links',
{
target: '_blank',
rel: 'noopener noreferer',
},
],
],
},
},
});