This repository has been archived by the owner on Mar 11, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathnuxt.config.js
153 lines (152 loc) · 3.71 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
export default {
mode: "universal",
target: "static",
/*
** Headers of the page
*/
head: {
title: process.env.npm_package_name || "",
script: [{ src: "https://kit.fontawesome.com/cf7cf76089.js" }],
title: "もりのパーティ! | まったりのんびりマイクラ生活!",
meta: [
{ charset: "utf-8" },
{
name: "viewport",
content: "width=device-width, initial-scale=1, viewport-fit=cover"
},
{
property: "og:title",
content: "もりのパーティ!"
},
{
hid: "description",
name: "description",
content:
"まったりのんびりマイクラ生活! もりのパーティは、マインクラフトサーバーを中心としたコミュニティです。"
},
{
property: "og:description",
content:
"まったりのんびりマイクラ生活! もりのパーティは、マインクラフトサーバーを中心としたコミュニティです。"
},
{
property: "og:type",
content: "website"
},
{
property: "og:site_name",
content: "もりのパーティ!"
},
{
property: "og:image",
content: "https://morino.party/img/thumbnail.jpg"
},
{
name: "twitter:card",
content: "summary_large_image"
},
{
name: "twitter:site",
content: "morinoparty"
}
],
link: [{ rel: "icon", type: "image/x-icon", href: "/img/icon.png" }]
},
/*
** Customize the progress-bar color
*/
loading: { color: "#fff" },
/*
** Global CSS
*/
css: [],
/*
** Plugins to load before mounting the App
*/
plugins: ["~/plugins/day.js"],
/*
** Nuxt.js dev-modules
*/
buildModules: [],
/*
** Nuxt.js modules
*/
modules: [
[
"nuxt-i18n",
{
vueI18nLoader: true,
detectBrowserLanguage: {
useCookie: true,
cookieKey: "i18n_redirected"
}
}
],
"fullpage-nuxt",
"nuxt-svg-loader",
"@nuxtjs/markdownit",
"@nuxtjs/sitemap",
"nuxt-purgecss"
],
i18n: {
locales: ["ja", "en"],
defaultLocale: "ja",
vueI18n: {
fallbackLocale: "ja",
messages: {}
}
},
markdownit: {
injected: true
},
/*
** Build configuration
*/
build: {
/*
** You can extend webpack config here
*/
extend(config, ctx) {},
extractCSS: true
},
sitemap: {
path: "/sitemap.xml",
hostname: "https://morino.party",
cacheTime: 1000 * 60 * 15,
gzip: true,
exclude: ["/en/**", "/admin/**"],
generate: false
},
generate: {
routes: function() {
const fs = require("fs");
const path = require("path");
const post = fs.readdirSync("./assets/content/blog").map(file => {
return {
route: `/${path.parse(file).name}`, // Return the slug
payload: require(`./assets/content/blog/${file}`)
};
});
const post_en = fs.readdirSync("./assets/content/blog").map(file => {
return {
route: `/en/${path.parse(file).name}`, // Return the slug
payload: require(`./assets/content/blog/${file}`)
};
});
const news = fs.readdirSync("./assets/content/news").map(file => {
return {
route: `/news/${path.parse(file).name}`, // Return the slug
payload: require(`./assets/content/news/${file}`)
};
});
const maps = ['main', 'lobby'].map(url => {
return {
route: `/maps/${url}`
}
})
return Promise.all([post, post_en, news, maps]).then(values => {
return [...values[0], ...values[1], ...values[2], ...values[3]];
});
}
}
};