-
Notifications
You must be signed in to change notification settings - Fork 0
/
nuxt.config.js
157 lines (145 loc) · 3.93 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
const PROJECT_TITLE = "Last Years Singles";
const PROJECT_DESCRIPTION =
"Listen to last years greatest songs as decided by the internet's largest reaching music sources";
const PROJECT_KEYWORDS =
"Last Years Singles, End of year list, 2021 best songs, 2021 top songs, top songs, pitchfork top 100"; // add more
const PROJECT_DOMAIN = "https://lastyears.singles";
export default {
// Target: https://go.nuxtjs.dev/config-target
target: "static",
server: {
port: 3000,
host: process.env.MOBILE ? "0.0.0.0" : "localhost",
},
// Global page headers: https://go.nuxtjs.dev/config-head
head: {
title: PROJECT_TITLE,
titleTemplate: `%s - ${PROJECT_TITLE}`,
meta: [
{ charset: "utf-8" },
{
name: "viewport",
content:
"width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=5.0, minimum-scale=1.0",
},
{ name: "referrer", content: "no-referrer" },
{
name: "title",
content: PROJECT_TITLE,
},
{
hid: "description",
name: "description",
content: PROJECT_DESCRIPTION,
},
{
name: "keywords",
content: PROJECT_KEYWORDS,
},
{
name: "twitter:card",
content: "summary_large_image",
},
{ name: "twitter:site", content: "@jthawme" },
{
name: "twitter:title",
content: PROJECT_TITLE,
},
{
name: "twitter:description",
content: PROJECT_DESCRIPTION,
},
{
name: "twitter:image:src",
content: `${PROJECT_DOMAIN}/social/twitter.png`,
},
{
name: "og:title",
property: "og:title",
content: PROJECT_TITLE,
},
{ name: "og:type", property: "og:type", content: "website" },
{
name: "og:url",
property: "og:url",
content: `${PROJECT_DOMAIN}`,
},
{
name: "og:image",
property: "og:image",
content: `${PROJECT_DOMAIN}/social/facebook.png`,
},
{
name: "og:description",
property: "og:description",
content: PROJECT_DESCRIPTION,
},
{
name: "og:site_name",
property: "og:site_name",
content: PROJECT_TITLE,
},
{ name: "author", content: "Jonny Thaw" },
{ meta: "msapplication-TileColor", content: "#ffffff" },
{ meta: "msapplication-TileImage", content: "/ms-icon-144x144.png" },
{ meta: "theme-color", content: "#ffffff" },
],
script: [
{
src:
process.env.NODE_ENV !== "production"
? "https://plausible.io/js/plausible.local.js"
: "https://plausible.io/js/plausible.js",
["data-domain"]: "lastyears.singles",
defer: true,
},
{
innerHTML: `window.plausible = window.plausible || function() { (window.plausible.q = window.plausible.q || []).push(arguments) }`,
type: "text/javascript",
charset: "utf-8",
},
],
__dangerouslyDisableSanitizers: ["script", "innerHTML"],
// link: [{ rel: "icon", type: "image/x-icon", href: "/favicon.ico" }],
},
// Global CSS: https://go.nuxtjs.dev/config-css
css: ["normalize.css"],
styleResources: {
scss: ["~/assets/scss/common.scss"],
},
plugins: [],
components: {
dirs: ["~/components", "~/components/common"],
},
buildModules: ["@nuxtjs/svg", "@nuxtjs/style-resources"],
modules: [
"@nuxtjs/pwa",
"@nuxt/http",
"@nuxtjs/markdownit",
"portal-vue/nuxt",
],
markdownit: {
injected: true,
html: true,
},
pwa: {
meta: {
theme_color: "#272727",
},
manifest: {
lang: "en",
name: "Last Years Singles",
short_name: "Singles",
description: PROJECT_DESCRIPTION,
background_color: "#272727",
},
},
build: {
transpile: [/vue-intersect/],
extend(config, context) {
if (context.isClient) {
config.externals = ["fs", "path"];
}
},
},
};