forked from esphome/esphome-devices
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gatsby-config.js
80 lines (78 loc) · 2.1 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
require("dotenv").config();
let skipAlgoliaPlugin = true;
if (process.env.ALGOLIA_ADMIN_KEY) {
skipAlgoliaPlugin = false;
}
module.exports = {
siteMetadata: {
siteTitle: `devices.esphome.io`,
defaultTitle: `devices.esphome.io`,
siteTitleShort: `devices.esphome.io`,
siteDescription: `This website is a repository of device configuration templates and setup guides for devices running ESPHome firmware.`,
siteUrl: `https://devices.esphome.io`,
siteAuthor: `@tekmaven`,
siteImage: `/banner.png`,
siteLanguage: `en`,
themeColor: `#8257E6`,
basePath: `/`,
},
trailingSlash: 'never',
flags: { PRESERVE_WEBPACK_CACHE: true },
plugins: [
{
resolve: `gatsby-plugin-google-gtag`,
options: {
// You can add multiple tracking ids and a pageview event will be fired for all of them.
trackingIds: [
"G-0QG5MYES89", // Google Analytics / GA
],
gtagConfig: {
anonymize_ip: true,
cookie_expires: 0,
},
pluginConfig: {
head: true,
respectDNT: true,
},
},
},
{
resolve: `@rocketseat/gatsby-theme-docs`,
options: {
configPath: `src/config`,
docsPath: `src/docs`,
repositoryUrl: `https://github.com/esphome/esphome-devices`,
baseDir: ``,
},
},
{
resolve: `gatsby-plugin-manifest`,
options: {
name: `ESPHome-Devices`,
short_name: `ESPHome-Devices`,
start_url: `/`,
background_color: `#ffffff`,
display: `standalone`,
icon: `static/favicon.png`,
},
},
`gatsby-plugin-sitemap`,
{
resolve: `gatsby-plugin-canonical-urls`,
options: {
siteUrl: `https://devices.esphome.io`,
},
},
`gatsby-plugin-offline`,
`gatsby-plugin-netlify`,
{
resolve: `gatsby-plugin-algolia`,
options: {
appId: process.env.GATSBY_ALGOLIA_APP_ID,
apiKey: process.env.ALGOLIA_ADMIN_KEY,
queries: require("./src/utils/algolia-queries"),
skipIndexing: skipAlgoliaPlugin,
},
},
],
};