/
nuxt.config.js
100 lines (91 loc) · 2.55 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
import 'util';
const isDev = (process.env.DEPLOY_ENV === 'PROD') ? false : true;
const domain = 'talks.oddbird.net';
const codeSrc = 'https://github.com/oddbird/vuefinder';
const httpUrl = `https://${domain}`;
const siteDesc = 'Details and slides from OddBird presentations';
const siteImage = {
src: '/images/_oddbird/social.jpg',
height: '498',
width: '1230',
};
const authors = {
miriam: {
name: 'Miriam Suzanne',
url: 'https://oddbird.net/authors/miriam',
twitter: 'mirisuzanne',
facebook: 'mirisuzanne',
}
};
module.exports = {
loading: false,
head: {
title: 'OddTalks',
meta: [
// GLOBAL
{ charset: 'utf-8' },
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
{ property: 'fb:app_id', content: '1820980378150914' },
{ property: 'og:site_name', content: 'OddTalks' },
{ name: 'twitter:site', content: '@oddbird' },
// ALL PAGES
{ hid: 'og_title', property: 'og:title', content: 'Talks by OddBird' },
{ hid: 'og_image', property: 'og:image', content: httpUrl + siteImage.src },
{ hid: 'og_image_height', property: 'og:image:height', content: siteImage.height },
{ hid: 'og_image_width', property: 'og:image:width', content: siteImage.width },
{ hid: 'og_url', property: 'og:url', content: httpUrl },
{ hid: 'og_type', property: 'og:type', content: 'website' },
{ hid: 'twitter_card', property: 'twitter:card', content: 'summary' },
{ hid: 'description', name: 'description', content: siteDesc },
],
link: [
{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' },
]
},
build: {
postcss: false,
splitChunks: {
layouts: true
},
extend(config, { isDev, isClient }) {
if (isDev && isClient) {
config.module.rules.push({
enforce: 'pre',
test: /\.(js|vue)$/,
loader: 'eslint-loader',
exclude: /(node_modules)/
});
}
config.module.rules.push({
test: /\.slides$/,
loaders: ['raw-loader'],
exclude: /(node_modules)/
});
},
watch: ['static/images/**/*.*']
},
modules: [
'@nuxtjs/markdownit',
'@nuxtjs/style-resources',
],
styleResources: {
scss: './assets/scss/config/_manifest.scss',
},
env: {
isDev,
codeSrc,
domain,
httpUrl,
siteDesc,
siteImage,
authors,
},
markdownit: {
html: true,
injected: true,
linkify: true,
preset: 'commonmark',
typographer: true,
use: ['markdown-it-highlightjs', 'markdown-it-attrs']
}
};