forked from LekoArts/gatsby-starter-minimal-blog
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gatsby-config.js
123 lines (120 loc) · 2.92 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
122
123
require(`dotenv`).config({
path: `.env`,
});
const newsletterFeed = require(`./src/utils/newsletterFeed`);
const themeOptions = require("./options");
const shouldAnalyseBundle = process.env.ANALYSE_BUNDLE;
const { mdx = true, feed, feedTitle, postsPath, pagesPath } = themeOptions;
module.exports = {
siteMetadata: {
siteTitleAlt: `Ayhan Sipahi - Web Log`,
siteTitle: `Ayhan Sipahi`,
siteHeadline: `Minimal Blog`,
siteUrl: `https://ayhan.dev`,
siteDescription: ``,
siteLanguage: `en`,
siteImage: `/banner.jpg`,
author: `@ayhansipahi`,
},
plugins: [
{
resolve: `gatsby-source-filesystem`,
options: {
name: postsPath,
path: postsPath,
},
},
{
resolve: `gatsby-source-filesystem`,
options: {
name: pagesPath,
path: pagesPath,
},
},
mdx && {
resolve: `gatsby-plugin-mdx`,
options: {
extensions: [`.mdx`, `.md`],
gatsbyRemarkPlugins: [
{
resolve: `gatsby-remark-images`,
options: {
maxWidth: 960,
quality: 90,
linkImagesToOriginal: false,
},
},
],
plugins: [
{
resolve: `gatsby-remark-images`,
options: {
maxWidth: 960,
quality: 90,
linkImagesToOriginal: false,
},
},
],
},
},
`gatsby-transformer-sharp`,
`gatsby-plugin-sharp`,
`gatsby-plugin-typescript`,
feed && {
resolve: `gatsby-plugin-feed`,
options: newsletterFeed(feedTitle),
},
`gatsby-plugin-react-helmet`,
`gatsby-plugin-typescript`,
`gatsby-plugin-catch-links`,
`gatsby-plugin-theme-ui`,
{
resolve: `gatsby-plugin-google-analytics`,
options: {
trackingId: "UA-29517280-5",
},
},
{
resolve: `gatsby-plugin-canonical-urls`,
options: {
siteUrl: `https://ayhan.dev`,
stripQueryString: true,
},
},
`gatsby-plugin-sitemap`,
{
resolve: `gatsby-plugin-manifest`,
options: {
name: `Ayhan Sipahi - Blog`,
short_name: `Ayhan Sipahi`,
description: ``,
start_url: `/`,
background_color: `#fff`,
theme_color: `#6B46C1`,
display: `standalone`,
icons: [
{
src: `/android-chrome-192x192.png`,
sizes: `192x192`,
type: `image/png`,
},
{
src: `/android-chrome-512x512.png`,
sizes: `512x512`,
type: `image/png`,
},
],
},
},
`gatsby-plugin-offline`,
`gatsby-plugin-netlify`,
shouldAnalyseBundle && {
resolve: `gatsby-plugin-webpack-bundle-analyser-v2`,
options: {
analyzerMode: `static`,
reportFilename: `_bundle.html`,
openAnalyzer: false,
},
},
].filter(Boolean),
};