-
Notifications
You must be signed in to change notification settings - Fork 0
/
gatsby-config.js
133 lines (132 loc) · 3.83 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
124
125
126
127
128
129
130
131
132
133
module.exports = {
pathPrefix: "",
siteMetadata: {
title: "Middlebury Handbook",
description: "Middlebury Handbook",
},
plugins: [
"gatsby-plugin-remove-fingerprints",
{
resolve: "gatsby-plugin-decap-cms",
options: {
modulePath: `${__dirname}/src/cms/cms.js`,
},
},
"gatsby-plugin-sass",
{
resolve: "gatsby-transformer-remark",
options: {
plugins: [
{
resolve: "gatsby-remark-autolink-headers",
options: {
enableCustomId: true,
icon: `<svg aria-hidden="true" height="0.75em" viewBox="0 0 16 16" version="1.1" width="0.75em" data-view-component="true" class="octicon octicon-link flex-shrink-0 mr-2"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg>`,
className: "anchor-link",
isIconAfterHeader: true
}
},
{
resolve: 'gatsby-remark-find-replace',
options: {
// remove static from the start of links
replacements: {
'static/': '/'
},
prefix: false,
},
},
],
},
},
"gatsby-plugin-react-helmet",
{
resolve: "gatsby-source-filesystem",
options: {
name: "i-policies-for-all",
path: `${__dirname}/content/i-policies-for-all`,
},
},
{
resolve: "gatsby-source-filesystem",
options: {
name: "ii-ug-college-policies",
path: `${__dirname}/content/ii-ug-college-policies`,
},
},
{
resolve: "gatsby-source-filesystem",
options: {
name: "iii-policies-for-the-language-schools",
path: `${__dirname}/content/iii-policies-for-the-language-schools`,
},
},
{
resolve: "gatsby-source-filesystem",
options: {
name: "iv-policies-for-the-institute",
path: `${__dirname}/content/iv-policies-for-the-institute`,
},
},
{
resolve: "gatsby-source-filesystem",
options: {
name: "v-policies-for-schools-abroad",
path: `${__dirname}/content/v-policies-for-schools-abroad`,
},
},
{
resolve: "gatsby-source-filesystem",
options: {
name: "vi-policies-for-middlebury-institute-online",
path: `${__dirname}/content/vi-policies-for-middlebury-institute-online`,
},
},
{
resolve: "gatsby-source-filesystem",
options: {
name: "vii-handbook-archive",
path: `${__dirname}/content/vii-handbook-archive`,
},
},
{
resolve: "gatsby-plugin-local-search",
options: {
name: "pages",
engine: "flexsearch",
engineOptions: {
encode: "icase",
async: false,
},
query: `
{
allMarkdownRemark {
nodes {
id
frontmatter {
slug
title
}
excerpt
rawMarkdownBody
html
}
}
}
`,
ref: "id",
index: ["title", "body"],
store: ["id", "slug", "title", "body", "excerpt", "html"],
normalizer: ({ data }) =>
data.allMarkdownRemark.nodes.map((node) => ({
id: node.id,
slug: node.frontmatter.slug,
title: node.frontmatter.title,
body: node.rawMarkdownBody,
excerpt: node.excerpt,
html: node.html,
})),
},
},
],
};