forked from getsentry/develop
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gatsby-config.js
106 lines (101 loc) · 3.03 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
// const path = require("path");
const activeEnv =
process.env.GATSBY_ENV || process.env.NODE_ENV || "development";
console.log(`Using environment config: '${activeEnv}'`);
require("dotenv").config({
path: `.env.${activeEnv}`,
});
const queries = require("./src/utils/algolia");
const getPlugins = () => {
const plugins = [
"gatsby-plugin-sass",
"gatsby-plugin-sharp",
"gatsby-plugin-zeit-now",
{
resolve: "gatsby-plugin-mdx",
options: {
remarkPlugins: [require("remark-deflist")],
gatsbyRemarkPlugins: [
{
resolve: `gatsby-remark-copy-linked-files`,
},
{
resolve: `gatsby-remark-autolink-headers`,
options: {
className: "anchor",
icon: `<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M10.879 6.05L15 1.93A5.001 5.001 0 0 1 22.071 9l-4.121 4.121a1 1 0 0 1-1.414-1.414l4.12-4.121a3 3 0 1 0-4.242-4.243l-4.121 4.121a1 1 0 1 1-1.414-1.414zm2.242 11.9L9 22.07A5 5 0 1 1 1.929 15l4.121-4.121a1 1 0 0 1 1.414 1.414l-4.12 4.121a3 3 0 1 0 4.242 4.243l4.121-4.121a1 1 0 1 1 1.414 1.414zm-8.364-.122l13.071-13.07a1 1 0 0 1 1.415 1.414L6.172 19.242a1 1 0 1 1-1.415-1.414z" fill="currentColor"></path></svg>`,
enableCustomId: true,
},
},
{
resolve: `gatsby-remark-images`,
options: {
maxWidth: 1200,
linkImagesToOriginal: false,
},
},
{
resolve: require.resolve("./plugins/gatsby-plugin-code-tabs"),
},
{
resolve: require.resolve("./plugins/gatsby-plugin-include"),
},
{
resolve: "gatsby-remark-prismjs",
options: {
noInlineHighlight: true,
},
},
],
},
},
"gatsby-plugin-react-helmet",
{
resolve: `gatsby-source-filesystem`,
options: {
name: `images`,
path: `${__dirname}/src/images`,
},
},
{
resolve: `gatsby-source-filesystem`,
options: {
name: `docs`,
path: `${__dirname}/src/docs`,
},
},
{
resolve: `gatsby-source-filesystem`,
options: {
name: `pages`,
path: `${__dirname}/src/pages`,
},
},
// this (optional) plugin enables Progressive Web App + Offline functionality
// To learn more, visit: https://gatsby.app/offline
// 'gatsby-plugin-offline',
];
if (process.env.ALGOLIA_INDEX === "1") {
plugins.push({
resolve: `gatsby-plugin-algolia`,
options: {
appId: process.env.GATSBY_ALGOLIA_APP_ID,
apiKey: process.env.ALGOLIA_ADMIN_KEY,
queries,
chunkSize: 10000, // default: 1000
},
});
}
return plugins;
};
module.exports = {
// pathPrefix: `/develop`,
siteMetadata: {
title: "Sentry Documentation",
homeUrl: "https://sentry.io",
sitePath: "develop.sentry.dev",
description: "",
author: "@getsentry",
},
plugins: getPlugins(),
};