forked from VOICEVOX/voicevox_blog
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gatsby-config.js
121 lines (119 loc) · 3.15 KB
/
gatsby-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
require("dotenv").config({
path: `.env.${process.env.NODE_ENV}`,
})
const siteUrl = process.env.NETLIFY
? process.env.DEPLOY_URL
: process.env.SITE_URL
if (siteUrl == undefined || siteUrl.length == 0) {
throw new Error("siteUrl is not defined")
}
module.exports = {
siteMetadata: {
title: `VOICEVOX`,
description: `VOICEVOXのホームページ`,
author: `Hiroshiba Kazuyuki`,
siteUrl,
},
plugins: [
`gatsby-plugin-react-helmet`,
`gatsby-plugin-image`,
`gatsby-plugin-react-svg`,
{
resolve: `gatsby-plugin-sharp`,
options: {
defaults: {
placeholder: `blurred`,
},
},
},
{
resolve: `gatsby-source-filesystem`,
options: {
name: `images`,
path: `${__dirname}/src/images`,
},
},
`gatsby-transformer-remark`,
{
resolve: `gatsby-source-filesystem`,
options: {
name: `markdown`,
path: `${__dirname}/src/markdowns`,
},
},
`gatsby-transformer-json`,
`gatsby-transformer-yaml`,
{
resolve: `gatsby-source-filesystem`,
options: {
name: `data`,
path: `${__dirname}/src/data`,
},
},
{
resolve: `gatsby-source-filesystem`,
options: {
name: `script`,
path: `${__dirname}/src/scripts`,
},
},
{
resolve: `gatsby-source-filesystem`,
options: {
name: `audio`,
path: `${__dirname}/src/audios`,
},
},
`gatsby-transformer-sharp`,
{
resolve: `gatsby-plugin-manifest`,
options: {
name: `gatsby-starter-default`,
short_name: `starter`,
start_url: `/`,
display: `minimal-ui`,
icon: `src/images/icon.png`, // This path is relative to the root of the site.
},
},
`gatsby-plugin-gatsby-cloud`,
// this (optional) plugin enables Progressive Web App + Offline functionality
// To learn more, visit: https://gatsby.dev/offline
// `gatsby-plugin-offline`,
`gatsby-plugin-sass`,
{
resolve: `gatsby-plugin-google-gtag`,
options: {
trackingIds: ["G-NZL33X0EQV"],
pluginConfig: {
head: true,
respectDNT: false,
},
},
},
`gatsby-plugin-sitemap`,
{
// デフォルトではアンダーバーがハイフンに変換されてしまうため
// slugifyのオプションを上書きしておく。collection routes以外には影響なし
// ref: https://www.gatsbyjs.com/plugins/gatsby-plugin-page-creator/#options
resolve: `gatsby-plugin-page-creator`,
options: {
path: `${__dirname}/src/pages`,
slugify: { separator: "_" },
ignore:
process.env.NODE_ENV != "development"
? [`**/__thumb_generator/**`]
: null,
},
},
{
resolve: `gatsby-plugin-canonical-urls`,
options: {
siteUrl,
stripQueryString: true,
},
},
// スタイルが適用される前に画面が表示されてちらつくのを防ぐ
// `gatsby-plugin-fix-fouc`, // FIXME: フォント容量が減ったら適用しても良いかも
],
graphqlTypegen: true,
}