-
Notifications
You must be signed in to change notification settings - Fork 0
/
nuxt.config.js
179 lines (164 loc) · 6.03 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
176
177
178
179
const author = 'jalofernandez'
const description = '@'+author+', designer + coder, personal portfolio and professional resume'
const lang = 'es-ES'
export default {
mode: 'universal', // deprecated
ssr: 'true', // use it instead "mode"
target: 'static',
head: {
htmlAttrs: {
lang: lang,
},
bodyAttrs: {
class: [author],
},
title: process.env.npm_package_name || '',
titleTemplate: "%s | @"+author+": designer + coder",
meta: [
{ charset: 'utf-8' },
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
// { hid: 'description', name: 'description', content: process.env.npm_package_description || '' },
{ hid: 'author', name: 'author', content: author },
{ hid: 'copyright', name: 'copyright', content: author },
{ hid: 'robots', name: 'robots', content: 'index, follow, archive' },
{ hid: 'generator', name: 'generator', content: 'HTML5, CSS3, Vuejs, Nuxtjs, JavaScript, SASS, PWA, SEO' },
{ hid: 'google', name: 'google', content: 'nositelinkssearchbox' },
{ hid: 'lang', name: 'lang', content: lang },
{ hid: 'rating', name: 'rating', content: 'General' },
{ hid: 'coverage', name: 'coverage', content: 'Worldwide' },
//- (metas) to customize (all browsers) top navbar
{ hid: 'theme-color', name: 'theme-color', content: '#f4692a' },
//- (metas) to Webkit (iOS Safari) browsers
{ hid: 'apple-mobile-web-app-capable', name: 'apple-mobile-web-app-capable', content: 'yes' },
{ hid: 'apple-mobile-web-app-status-bar-style', name: 'apple-mobile-web-app-status-bar-style', content: 'black' },
{ hid: 'apple-mobile-web-app-title', name: 'apple-mobile-web-app-title', content: author },
//- (metas) IE (windows phone) browsers
// { hid: 'msapplication-TileImage', name: 'msapplication-TileImage', content: '/src/images/icons/app-icon-144x144.png' },
{ hid: 'msapplication-TileColor', name: 'msapplication-TileColor', content: '#232323' },
//- (microdata) TWITTER
// { hid: 'twitter:image', name: 'twitter:image', content: 'https://peluqueriacanessa.com/img/microdata/peluqueria-canina-canessa-valdemoro-index.jpg', },
// { hid: 'twitter:image:alt', name: 'twitter:image:alt', content: 'Jalofernández design, webmaster, frontend y diseño gráfico en Madrid' },
// ------------- TODO ----------
// IMP! -> check if the following code is necessary cause "nuxt-social-meta" plugin
{ hid: 'twitter:card', name: 'twitter:card', content: 'summary_large_image' },
{ hid: 'twitter:site', name: 'twitter:site', content: author },
{ hid: 'twitter:creator', name: 'twitter:creator', content: author },
//- (open-graph) FACEBOOK
{ name: 'og:type', content: 'website' },
{ name: 'og:locale', content: 'es_ES' },
{ name: 'og:site_name', content: description },
// ------------- TODO ----------
],
link: [
{ rel: 'author', type: 'text/plain', href: 'https://jalofernandez.com/humans.txt' },
// { rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }
{ rel: 'dns-prefetch', href: '//twitter.com/jalofernandez' },
{ rel: 'dns-prefetch', href: '//www.instagram.com/jalofernandez/?ref=badge' },
{ rel: 'dns-prefetch', href: '//www.linkedin.com/in/javierlorenzofernandez/' },
{ rel: 'dns-prefetch', href: '//www.youtube.com/channel/UCtwY5GMTiS7VQ7kYzGomUsw' },
{ rel: 'dns-prefetch', href: '//www.facebook.com/jalofernandez?ref=tn_tnmn' },
{ rel: 'dns-prefetch', href: '//github.com/jalofernandez' },
]
},
loading: { color: '#ccc' },
css: ['@/assets/styles.sass'],
plugins: [],
buildModules: [
'@nuxtjs/pwa',
'@aceforth/nuxt-optimized-images',
],
modules: [
'vue-scrollto/nuxt',
'nuxt-webfontloader',
"nuxt-purgecss",
[
"nuxt-social-meta",
{
title: "@jalofernandez: designer + coder",
description:
"Javier Lorenzo Fdez personal resume and professional portfolio as a graphic designer and front-end + UX developer",
url: "https://www.jalofernandez.com",
// img: "/link_to_image_in_static_folder.jpg",
locale: lang,
twitter: "@jalofernandez",
themeColor: "#232323"
}
],
['nuxt-mq'],
'@nuxtjs/robots',
'@nuxtjs/gtm',
'@nuxtjs/sitemap', // always declare the sitemap module at end of array
],
webfontloader: {
google: {
families: ['Roboto+Mono:wght@300;400;600', 'Roboto:ital,wght@0,300;0,400;0,700;1,400&display=swap'],
},
},
purgeCSS: {
// Overrides the default settings here
},
robots: {
UserAgent: "*",
Allow: "/",
Sitemap: `https://jalofernandez.com/sitemap.xml`,
},
optimizedImages: {
optimizeImages: true
},
mq: {
defaultBreakpoint: "desktop",
breakpoints: {
mobile: 600,
smartphone: 768,
tablet: 1024,
desktop: 1400,
desktopWide: 2000,
desktopUltraWide: Infinity
}
},
pwa: {
manifest: {
name: 'jalofernandez: designer + coder',
short_name: 'jalofernandez',
description: description,
// start_url: 'index.html?launcher=true', // value by default ("/?standalone=true")
lang: 'es',
// display: 'standalone', // value by default
background_color: '#fbf8ff',
theme_color: '#363636',
lang: lang,
// dir: 'ltr', // value by default
useWebmanifestExtension: false,
},
workbox: {
// enabled: true, // check it asap!
},
},
gtm: {
id: 'GTM-T5NGQ9L',
enabled: true,
scriptDefer: true,
pageTracking: true,
},
sitemap: {
hostname: `https://jalofernandez.com`,
gzip: true,
// exclude: ['/perretes', '/blog', '/blog/', '/blog/**'],
defaults: {
changefreq: 'daily',
priority: 1,
lastmod: new Date(),
lastmodrealtime: true,
},
},
generate: {
subFolders: false,
fallback: '404.html'
// dir: 'public' // to deploy in Google Firebase ('dist' by default)
},
build: {
// You can extend webpack config here
extend (config, ctx) {
}
}
}