This repository has been archived by the owner on Oct 25, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
nuxt.config.js
103 lines (90 loc) · 3.01 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
const { gitDescribeSync } = require('git-describe');
import envComputer from './plugins/env.js';
const HOST_PATH = envComputer(process.env.ENV);
process.env.GIT_DESCRIBE = JSON.stringify(gitDescribeSync({
longSemver: true,
dirtySemver: false,
requireAnnotated: false,
match: '*',
}));
export default {
// Global page headers: https://go.nuxtjs.dev/config-head
head: {
title: 'id.kb.se',
htmlAttrs: {
lang: 'sv'
},
meta: [
{ charset: 'utf-8' },
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
{ hid: 'description', name: 'description', content: 'Grundstenar för länkade data hos Kungliga biblioteket.' },
{ hid:'og:title', property:'og:title', content:'id.kb.se' },
{ hid:'og:site_name', property:'og:site_name', content:'id.kb.se' },
{ hid:'og:description', property:'og:description', content:'Grundstenar för länkade data hos Kungliga biblioteket.' },
{ hid:'og:image', property:'og:image', content:`${HOST_PATH}/opengraph.png` },
{ hid:'og:image:width', property:'og:image:width', content:'1200' },
{ hid:'og:image:height', property:'og:image:height', content:'600' },
{ hid:'twitter:image', property:'twitter:image', content:`${HOST_PATH}/opengraph.png` },
{ hid:'twitter:card', name:'twitter:card', content:'summary_large_image' },
],
link: [
{ rel: 'icon', type: 'image/svg+xml', href: '/favicon.svg' },
{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }
]
},
// Global CSS: https://go.nuxtjs.dev/config-css
css: [
'~/assets/scss/main.scss',
],
// Plugins to run before rendering page: https://go.nuxtjs.dev/config-plugins
plugins: [
'~plugins/filters.js',
'~mixins/lxl.js',
],
router: {
middleware: ['marc'],
},
// Auto import components: https://go.nuxtjs.dev/config-components
components: false,
parallel: true,
// Modules for dev and build (recommended): https://go.nuxtjs.dev/config-modules
buildModules: [
'@nuxtjs/dotenv'
],
// Modules: https://go.nuxtjs.dev/config-modules
modules: [
'@nuxtjs/style-resources',
'@nuxt/http',
],
styleResources: {
hoistUseStatements: true,
scss: [
'~/assets/scss/_variables.scss',
'~/node_modules/kungbib-styles/lib/scss/_variables.scss',
'~/node_modules/bootstrap/scss/_functions.scss',
'~/node_modules/bootstrap/scss/_variables.scss',
'~/node_modules/bootstrap/scss/_mixins.scss',
'~/node_modules/bootstrap/scss/_containers.scss',
'~/node_modules/bootstrap/scss/_grid.scss'
],
},
publicRuntimeConfig: {
apiPath: process.env.API_PATH || 'http://localhost:5000',
siteName: 'id.kb.se',
environment: process.env.ENV,
},
privateRuntimeConfig: {
},
// Build Configuration: https://go.nuxtjs.dev/config-build
build: {
transpile: [
'lxltools',
'lodash-es',
],
extend(config, ctx) {
if (ctx.isDev) {
config.devtool = ctx.isClient ? 'source-map' : 'inline-source-map'
}
}
}
}