-
Notifications
You must be signed in to change notification settings - Fork 0
/
nuxt.config.js
204 lines (184 loc) · 5.38 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
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
export default {
// SERVER-SIDE RENDERING MODE: https://go.nuxtjs.dev/ssr-mode
ssr: true, // true: Server-side rendering enabled, false: No server-side rendering (only client-side rendering)
// CONFIG TARGET: https://go.nuxtjs.dev/config-target
target: 'static', // 'server': For server side rendering and 'static': For static sites
// Global page headers: https://go.nuxtjs.dev/config-head
head: {
htmlAttrs: {
lang: 'en',
},
meta: [
{ charset: 'utf-8' },
{
name: 'viewport',
content: 'width=device-width, initial-scale=1',
}
],
link: [{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }],
},
loading: {
color: '#5eede1',
height: '4px',
},
// Plugins to run before rendering page: https://go.nuxtjs.dev/config-plugins
plugins: [
{ src: './plugins/prism.js', mode: 'client' },
{ src: './plugins/bootstrap-vue.js' },
],
// Modules for dev and build (recommended): https://go.nuxtjs.dev/config-modules
buildModules: [
'@nuxt/image', // https://image.nuxtjs.org/
'@nuxt/components', // https://github.com/nuxt/components#readme
'@nuxtjs/style-resources', // https://github.com/nuxt-community/style-resources-module#readme
'@nuxtjs/eslint-module', // https://go.nuxtjs.dev/eslint
'@nuxtjs/google-fonts', // https://google-fonts.nuxtjs.org/
'@nuxtjs/google-analytics', // https://google-analytics.nuxtjs.org/
],
googleFonts: {
display: 'swap',
preload: true,
prefetch: true,
families: {
Oswald: [200, 300, 400, 500, 700],
Lato: [100, 300, 400, 700, 900],
Pacifico: [400],
},
},
googleAnalytics: {
id: 'UA-134680170-1',
},
image: {},
// Auto import components: https://go.nuxtjs.dev/config-components w/@nuxt/components https://github.com/nuxt/components
components: true,
// Modules: https://go.nuxtjs.dev/config-modules
modules: [
'bootstrap-vue/nuxt',
'@nuxt/content', // https://go.nuxtjs.dev/content
'nuxt-fontawesome',
'@nuxtjs/robots', // https://www.npmjs.com/package/@nuxtjs/robots
'@nuxtjs/sitemap', // https://sitemap.nuxtjs.org/guide/setup
],
styleResources: {
scss: [
'@/assets/scss/index.scss', // Barrel file
],
},
// Content module configuration: https://go.nuxtjs.dev/config-content
content: {
markdown: {
prism: {
theme: 'prism-themes/themes/prism-material-oceanic.css',
},
},
},
// https://www.npmjs.com/package/nuxt-fontawesome
fontawesome: {
imports: [
{
set: '@fortawesome/pro-regular-svg-icons',
icons: [
'faAdjust',
'faChevronLeft',
'faChevronRight',
'faFolders',
'faPhoneLaptop',
],
},
{
set: '@fortawesome/pro-light-svg-icons',
icons: [
'faConciergeBell',
'faHandshake',
'faUserAstronaut',
'faHashtag',
'faCode',
'faGraduationCap',
'faRss',
'faTimes',
'faChevronDoubleRight',
'faTrophyAlt',
'faThunderstormMoon',
'faBriefcase',
'faHandsHeart',
'faPencil',
'faBars',
'faGem',
'faBrackets',
'faChartNetwork',
'faSubway',
'faEnvelope',
],
},
{
set: '@fortawesome/pro-duotone-svg-icons',
icons: ['faFileUser', 'faClipboardListCheck', 'faBrowser'],
},
{
set: '@fortawesome/free-brands-svg-icons',
icons: [
'faStackOverflow',
'faCodepen',
'faGithub',
'faYoutube',
'faLinkedinIn',
'faJsSquare',
'faSass',
'faReact',
'faGit',
'faVuejs',
'faNodeJs',
],
},
{
set: '@fortawesome/pro-solid-svg-icons',
icons: ['faGraduationCap', 'faCheck', 'faHomeLgAlt', 'faRss'],
},
],
},
sitemap: {
hostname: 'https://cristin.io',
gzip: true,
defaults: {
changefreq: 'monthly',
priority: 1,
lastmod: new Date(),
},
routes: [
'/blog/articles/best-online-professional-development-resources',
'/blog/articles/women-in-computing-are-losing-ground',
'/blog/articles/a-curated-list-of-cheatsheets-for-web-developers',
'/blog/articles/perilous-confusion-and-the-opportunity-for-growth',
'/blog/articles/clean-up-development-commits-by-combining-them-into-one',
'/blog/articles/use-webhooks-to-automatically-deploy-your-gatsby-site',
'/blog/articles/what-is-destructuring-in-javascript',
'/blog/articles/automatically-convert-pixels-to-rems-with-sass',
'/blog/articles/create-an-alias-to-list-git-branches-by-date',
'/blog/articles/search-git-history-for-certain-words-and-phrases',
'/blog/1',
'/blog/2',
],
},
router: {},
// use these settings to use custom css
bootstrapVue: {
bootstrapCSS: true,
icons: true,
},
// specify module rules for css and scss
module: {
rules: [
{
test: /\.s[ac]ss$/i,
use: ['style-loader', 'css-loader', 'sass-loader'],
},
],
},
serverMiddleware: ['~/server-middleware/seo.js'],
// Build Configuration: https://go.nuxtjs.dev/config-build
build: {},
// fallback to the generated 404.html when in SPA mode instead of Netlify's 404 page.
generate: {
fallback: true,
},
}