-
Notifications
You must be signed in to change notification settings - Fork 0
/
gatsby-config.ts
121 lines (117 loc) · 2.76 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
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
import type { GatsbyConfig } from "gatsby";
import { config as env } from "dotenv";
import feeds from "./src/utils/rss";
env({ path: `.env` });
const PHOTOS_DATABASE = "34e2befe9a77492c825996d6e238880d";
const VIDEOS_DATABASE = "ad2cddcf3e644aa1b7582ec34b5f8f34";
const MUSICS_DATABASE = "297a072af5854bf38a23e1fa11c23349";
const RECIPES_DATABASE = "7a13ff42f6174106be20fa0401af6ff3";
const DRESSES_DATABASE = "8001b0eba0a5401c8ffe343ad1ce07ca";
const config: GatsbyConfig = {
siteMetadata: {
siteUrl: "https://tansongchen.com",
title: "众妙斋",
},
plugins: [
"gatsby-plugin-image",
"gatsby-plugin-sitemap",
{
resolve: "gatsby-plugin-manifest",
options: {
name: `众妙斋`,
short_name: `众妙斋`,
start_url: `/`,
background_color: `#f7f0eb`,
theme_color: `#ffffff`,
display: `standalone`,
icon: "src/images/icon-pwa.png",
icon_options: {
purpose: `maskable`,
},
},
},
// `gatsby-plugin-offline`,
{
resolve: `gatsby-plugin-sharp`,
options: {
defaults: {
formats: [`webp`],
placeholder: `blurred`,
quality: 50,
breakpoints: [750, 1080, 1366, 1920],
backgroundColor: `transparent`,
tracedSVGOptions: {},
blurredOptions: {},
jpgOptions: {},
pngOptions: {},
webpOptions: {},
avifOptions: {},
},
stripMetadata: false,
},
},
"gatsby-transformer-sharp",
{
resolve: "gatsby-source-filesystem",
options: {
name: "images",
path: "src/images/",
},
__key: "images",
},
{
resolve: "gatsby-source-filesystem",
options: {
name: "contents",
path: "contents/",
},
__key: "contents",
},
"gatsby-plugin-sass",
{
resolve: `gatsby-source-notion`,
options: {
previewCallRate: 0,
databases: [
PHOTOS_DATABASE,
VIDEOS_DATABASE,
MUSICS_DATABASE,
RECIPES_DATABASE,
DRESSES_DATABASE,
],
},
},
{
resolve: `gatsby-transformer-remark`,
options: {
plugins: [
{
resolve: `gatsby-remark-katex`,
options: {
strict: `ignore`,
throwOnError: false,
},
},
],
},
},
{
resolve: `gatsby-plugin-purgecss`,
options: {
printRejected: true,
develop: true,
purgeCSSOptions: {
safelist: ["has-navbar-fixed-top"],
},
},
},
{
resolve: `gatsby-plugin-feed`,
options: {
feeds: feeds,
},
},
],
graphqlTypegen: true,
};
export default config;