-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathgatsby-config.js
112 lines (107 loc) · 2.73 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
const queries = require(`./src/utils/algolia`)
const macros = require(`./src/utils/katex`)
const rssOptions = require(`./src/utils/rss`)
const sitemapOptions = require(`./src/utils/sitemap`)
require(`dotenv`).config()
const siteMetadata = {
title: `bgoonz.dev`,
description: `Physics, machine learning, sustainability and web development.`,
author: `Bryan Guner`,
url: `https://bgoonz.dev`,
}
const gatsbyRemarkPlugins = [
`gatsby-remark-smartypants`,
`gatsby-remark-embed-video`,
`gatsby-remark-responsive-iframe`,
`gatsby-remark-copy-linked-files`,
`gatsby-remark-code-titles`,
`gatsby-remark-sub-sup`,
`gatsby-remark-autolink-headers`,
{
resolve: `gatsby-remark-vscode`,
options: { extensions: [`mdx`, `vscode-styled-components`] },
},
{
resolve: `gatsby-remark-katex`,
options: { macros, throwOnError: false },
},
{
resolve: `gatsby-remark-images`,
options: {
maxWidth: 1200,
linkImagesToOriginal: false,
wrapperStyle: `border-radius: 0.5em; overflow: hidden;`,
},
},
{
resolve: `gatsby-remark-emojis`,
options: { active: true, size: 24 },
},
]
const plugins = [
{
resolve: `gatsby-plugin-mdx`,
options: {
gatsbyRemarkPlugins,
plugins: [`gatsby-remark-images`, `gatsby-remark-autolink-headers`],
extensions: [`.mdx`, `.md`],
},
},
{
resolve: `gatsby-transformer-sharp`,
options: {
// https://github.com/gatsbyjs/gatsby/issues/21776#issuecomment-604924320
checkSupportedExtensions: false,
},
},
`gatsby-plugin-sharp`,
`gatsby-transformer-yaml`,
{
resolve: `gatsby-source-filesystem`,
options: {
path: `${__dirname}/content`,
ignore: process.env.NODE_ENV === `production` ? [`**/posts/drafts`] : [],
},
},
`gatsby-transformer-yaml`,
`gatsby-plugin-catch-links`,
`gatsby-plugin-styled-components`,
{
resolve: `gatsby-plugin-google-analytics`,
options: {
trackingId: process.env.GOOGLE_ANALYTICS_ID,
},
},
{
resolve: `gatsby-plugin-algolia`,
options: {
appId: process.env.GATSBY_ALGOLIA_APP_ID,
apiKey: process.env.ALGOLIA_ADMIN_KEY,
queries,
chunkSize: 10000, // default: 1000
},
},
{
resolve: `gatsby-plugin-feed`,
options: rssOptions,
},
{
resolve: `gatsby-plugin-sitemap`,
options: sitemapOptions,
},
{
resolve: `gatsby-plugin-manifest`,
options: {
name: siteMetadata.title,
short_name: siteMetadata.title,
display: `standalone`,
icon: `content/favicon.svg`,
background_color: `#150956`,
theme_color: `#150956`,
},
},
`gatsby-plugin-lodash`,
`gatsby-plugin-react-helmet`,
`gatsby-plugin-netlify-cache`,
]
module.exports = { siteMetadata, plugins }