-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgatsby-config.ts
71 lines (67 loc) · 1.75 KB
/
gatsby-config.ts
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
import type { GatsbyConfig } from "gatsby";
require("dotenv").config({
path: `.env`,
});
const siteMetadata = {
title: "vonxai inc.",
description: "vonxai inc.のコーポレートサイトです",
siteUrl: "https://www.vonxai.co.jp/",
};
const config: GatsbyConfig = {
siteMetadata,
// More easily incorporate content into your pages through automatic TypeScript type generation and better GraphQL IntelliSense.
// If you use VSCode you can also use the GraphQL plugin
// Learn more at: https://gatsby.dev/graphql-typegen
plugins: [
"gatsby-plugin-postcss",
{
resolve: "gatsby-plugin-google-tagmanager",
options: {
id: "GTM-W27JGZF",
includeInDevelopment: false,
defaultDataLayer: { platform: "gatsby" },
routeChangeEventName: "gatsby-route-change",
},
},
{
resolve: "gatsby-source-filesystem",
options: {
name: "assets",
path: `${__dirname}/static/assets/`,
},
},
{
resolve: "gatsby-plugin-sitemap",
options: {
output: "/sitemap",
excludes: [],
query: `{
site {
siteMetadata {
siteUrl
}
}
allSitePage {
nodes {
path
}
}
}`,
resolveSiteUrl: () => siteMetadata.siteUrl,
resolvePages: ({ allSitePage }) => {
return allSitePage.nodes.map((node) => node);
},
filterPages: (page, excludedRoute, { minimatch }) => {
return minimatch(page.path, excludedRoute);
},
serialize: ({ path, lastmod }) => {
return {
url: path,
lastmod: lastmod,
};
},
},
},
],
};
export default config;