-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnuxt.config.js
183 lines (166 loc) · 5.6 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
import colors from 'vuetify/es5/util/colors'
const { NODE_ENV = 'production' } = process.env
const isDev = NODE_ENV === 'development'
// eslint-disable-next-line nuxt/no-cjs-in-config
const countries = require('./content/countriesData/countries.json')
const t = []
for (const i of countries) {
t.push('/flag/' + i.id)
}
const PLAUSIBLE_DOMAIN = 'plausible.noewen.com'
const DOMAIN = 'geobtenu.netlify.app'
export default {
// Target (https://go.nuxtjs.dev/config-target)
target: 'static',
ssr: true,
plugins: [
{ src: '~/plugins/leaflet.js', ssr: false }
],
generate: {
routes: t,
fallback: true
},
// Global page headers (https://go.nuxtjs.dev/config-head)
head: {
title: 'Géobtenu | Outil de géographie',
meta: [
// Primary meta tags
{ charset: 'utf-8' },
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
{ hid: 'description', name: 'description', content: 'Un outil simple et efficace pour obtenir des informations sur un pays !' },
{ name: 'keywords', content: 'geobtenu,géobtenu,geography,géographie,geoguessr,geo,wiki,meta,méta,metas,métas,info,capital,circulation,sens,direction,pays,informations,tips,conseils,continent,domaine,domain,language,langues,langue,alphabet' },
{ name: 'author', content: 'kernoeb' },
{ name: 'language', content: 'French' },
{ name: 'robots', content: 'index,follow' },
{ name: 'category', content: 'internet' },
{ hid: 'title', name: 'title', content: 'Géobtenu | Outil de géographie' },
// Facebook
{ property: 'og:type', content: 'website' },
{ property: 'og:url', content: 'https://geobtenu.netlify.app/' },
{ hid: 'og:title', property: 'og:title', content: 'Géobtenu | Outil de géographie' },
{ hid: 'og:description', property: 'og:description', content: 'Un outil simple et efficace pour obtenir des informations sur un pays !' },
{ property: 'og:image', content: 'https://geobtenu.netlify.app/banner.png' },
// Twitter
{ property: 'twitter:card', content: 'summary_large_image' },
{ property: 'twitter:url', content: 'https://geobtenu.netlify.app/' },
{ hid: 'twitter:title', property: 'twitter:title', content: 'Géobtenu | Outil de géographie' },
{ hid: 'twitter:description', property: 'twitter:description', content: 'Un outil simple et efficace pour obtenir des informations sur un pays !' },
{ property: 'twitter:image', content: 'https://geobtenu.netlify.app/banner.png' }
],
link: [
{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }
]
},
// 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',
// https://go.nuxtjs.dev/vuetify
'@nuxtjs/vuetify',
['@nuxtjs/google-fonts', {
families: {
Roboto: true,
'Secular+One': true
}
}],
// https://github.com/moritzsternemann/vue-plausible
'vue-plausible'
],
// Modules (https://go.nuxtjs.dev/config-modules)
modules: [
'@nuxtjs/component-cache',
// https://go.nuxtjs.dev/axios
'@nuxtjs/axios',
// https://go.nuxtjs.dev/content
'@nuxt/content',
'@nuxtjs/robots',
'@nuxtjs/sitemap'
],
sitemap: {
hostname: 'https://geobtenu.netlify.app',
gzip: true
},
plausible: { // Use as fallback if no runtime config is available at runtime
domain: DOMAIN,
enableAutoPageviews: true,
enableAutoOutboundTracking: true
},
publicRuntimeConfig: {
plausible: {
domain: DOMAIN,
apiHost: 'https://' + PLAUSIBLE_DOMAIN,
enableAutoPageviews: true,
enableAutoOutboundTracking: true
}
},
// Content module configuration (https://go.nuxtjs.dev/config-content)
content: {
markdown: {
remarkPlugins () {
return ['remark-emoji']
}
}
},
// Vuetify module configuration (https://go.nuxtjs.dev/config-vuetify)
vuetify: {
defaultAssets: false,
theme: {
dark: true,
themes: {
dark: {
primary: colors.blue.darken2,
accent: colors.grey.darken3,
secondary: colors.amber.darken3,
info: colors.teal.lighten1,
warning: colors.amber.base,
error: colors.deepOrange.accent4,
success: colors.green.accent3
}
}
}
},
// Build Configuration (https://go.nuxtjs.dev/config-build)
build: {
extractCSS: true,
postcss:
{
// disable postcss plugins in development
plugins: isDev
? {}
: {
'@fullhuman/postcss-purgecss': {
content: [
'components/**/*.vue',
'layouts/**/*.vue',
'pages/**/*.vue',
'plugins/**/*.js',
'node_modules/vuetify/src/**/*.ts'
],
styleExtensions: ['.css'],
safelist: {
standard: [
'body',
'html',
'nuxt-progress',
/col-*/, // enable if using v-col for layout,
/v-speed/
],
deep: [
/page-enter/,
/page-leave/,
/transition/
]
}
},
'css-byebye': {
rulesToRemove: [
/.*\.v-application--is-rtl.*/,
/.*light.*/
]
}
}
}
}
}