This repository has been archived by the owner on Sep 1, 2021. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 30
/
nuxt.config.js
220 lines (204 loc) · 6.17 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
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
import getSiteMeta from "./utils/getSiteMeta";
const meta = getSiteMeta();
export default {
// Disable server-side rendering (https://go.nuxtjs.dev/ssr-mode)
ssr: false,
server: {
host: process.env.HOST || '0', // default: localhost
port: '80'
},
publicRuntimeConfig: {
baseURL: process.env.BASE_URL || 'http://localhost:8000',
appEnv: process.env.APP_ENV || 'production'
},
sitemap: [
{
hostname: process.env.BASE_URL || 'http://localhost:3000',
path: '/sitemap.xml',
gzip: true,
}
],
// Global page headers (https://go.nuxtjs.dev/config-head)
head: {
htmlAttrs: {
lang: "en-GB",
},
title: "Family Tree 365 - Start your family tree today - free! Your first tree is 100% free. Sign-up to begin your genealogy journey today!",
meta: [
...meta,
{charset: "utf-8"},
{name: "HandheldFriendly", content: "True"},
{name: "viewport", content: "width=device-width, initial-scale=1"},
{property: "og:site_name", content: "Family Tree 365"},
{
hid: "description",
name: "description",
content:
"Our user-friendly yet powerful platform lets you create your own family tree the quick and easy way. No technical knowledge is required. Start your family tree today - free!",
},
{property: "og:image:width", content: "2500"},
{property: "og:image:height", content: "780"},
{name: "twitter:site", content: "@familytree365"},
{name: "twitter:card", content: "summary_large_image"},
],
link: [
{rel: "icon", href: "/favicon.ico"},
{
hid: "canonical",
rel: "canonical",
href: process.env.BASE_URL,
},
],
script: [
// {src: 'https://cdnjs.cloudflare.com/ajax/libs/d3/5.15.0/d3.min.js'},
// {src: 'https://cdnjs.cloudflare.com/ajax/libs/d3-tip/0.9.1/d3-tip.min.js'},
// {src: 'https://cdn.jsdelivr.net/npm/[email protected]/dist/d3-dag.min.js'},
{src: 'https://cdn.rawgit.com/eligrey/canvas-toBlob.js/f1a01896135ab378aa5c0118eadd81da55e698d8/canvas-toBlob.js'},
{src: 'https://cdn.rawgit.com/eligrey/FileSaver.js/e9d941381475b5df8b7d7691013401e171014e89/FileSaver.min.js'}
],
// Global CSS (https://go.nuxtjs.dev/config-css)
css: []
},
env: {
STRIPE_KEY: process.env.STRIPE_KEY,
BASE_URL: process.env.BASE_URL,
ECHO_PORT: process.env.ECHO_PORT,
},
// Plugins to run before rendering page (https://go.nuxtjs.dev/config-plugins)
plugins: [
{src: '~/plugins/vue-good-table', ssr: false},
{src: '~/plugins/vuelidate.js', ssr: false},
{src: '~/plugins/vue-select.js', ssr: false},
{src: '~/plugins/v-calendar.js', ssr: false},
{src: '~/plugins/vuetimepiker.js', ssr: false},
{src: '~/plugins/vue-fb-customer-chat.js', ssr: false},
{src: '~/plugins/vue-instantsearch.js', ssr: false},
// {src: '~/plugins/echo.js', ssr: false},
],
// Auto import components (https://go.nuxtjs.dev/config-components)
components: true,
transpile: ['vue-instantsearch', 'instantsearch.js/es'],
// Modules for dev and build (recommended) (https://go.nuxtjs.dev/config-modules)
buildModules: [
'@nuxtjs/laravel-echo',
'nuxt-content-algolia'
],
hooks: {
'content:file:beforeInsert': (content) => {
const removeMd = require('remove-markdown');
if (content.extension == 'md') {
content.bodyPlainText = removeMd(content.text);
}
}
},
nuxtContentAlgolia: {
appId: process.env.ALGOLIA_APP_ID,
apiKey: process.env.ALGOLIA_API_KEY,
paths: [
{
name: 'articles',
index: 'articles',
fields: ['title', 'description', 'bodyPlainText']
}
]
},
echo: {
broadcaster: 'socket.io',
host: `${process.env.HOSTNAME}:${process.env.ECHO_PORT}`,
},
// Modules (https://go.nuxtjs.dev/config-modules)
modules: [
// https://go.nuxtjs.dev/bootstrap
'@nuxtjs/bulma',
'@nuxtjs/axios',
'@nuxtjs/auth',
'@nuxt/content',
'@nuxtjs/sitemap',
'nuxt-socket-io',
[
'nuxt-fontawesome', {
imports: [
{
set: '@fortawesome/free-solid-svg-icons',
icons: ['fas']
},
{
set: '@fortawesome/free-brands-svg-icons',
icons: ['fab']
},
{
set: "@fortawesome/free-regular-svg-icons",
icons: ["far"]
}
]
}
],
['nuxt-stripe-module', {
publishableKey: process.env.STRIPE_KEY,
}],
'nuxt-buefy',
['nuxt-buefy', { /* buefy options */}]
],
axios: {
baseURL: process.env.BASE_URL,
credentials: true
},
auth: {
redirect: {
login: '/login',
logout: '/',
callback: '/login',
home: '/dashboard'
},
strategies: {
local: {
endpoints: {
login: {
url: '/login', method: 'post', propertyName: false, withCredentials: true,
headers: {
'X-Requested-With': 'XMLHttpRequest',
'Content-Type': 'application/json'
}
},
logout: {url: '/logout', method: 'post'},
user: {
url: '/api/user', method: 'get', propertyName: false, withCredentials: true,
headers: {
'X-Requested-With': 'XMLHttpRequest',
'Content-Type': 'application/json'
}
}
},
tokenRequired: false,
tokenType: false
}
},
localStorage: false
},
io: {
// module options
sockets: [{
name: 'main',
url: 'http://localhost:3000'
}]
},
// Build Configuration (https://go.nuxtjs.dev/config-build)
build: {
filenames: {
app: ({isDev}) => isDev ? '[name].js' : '[chunkhash].js',
chunk: ({isDev}) => isDev ? '[name].js' : '[chunkhash].js',
css: ({isDev}) => isDev ? '[name].css' : '[contenthash].css',
img: ({isDev}) => isDev ? '[path][name].[ext]' : 'img/[hash:7].[ext]',
font: ({isDev}) => isDev ? '[path][name].[ext]' : 'fonts/[hash:7].[ext]',
video: ({isDev}) => isDev ? '[path][name].[ext]' : 'videos/[hash:7].[ext]'
},
postcss: {
preset: {
features: {
customProperties: false
}
}
},
transpile: ['d3-dag']
}
}