forked from andrew-codes/gatsby-plugin-elasticlunr-search
-
Notifications
You must be signed in to change notification settings - Fork 25
/
gatsby-config.js
32 lines (32 loc) · 901 Bytes
/
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
module.exports = {
siteMetadata: {
title: `gatsby-plugin-elasticlunr-search example site`,
},
pathPrefix: `/gatsby-plugin-elasticlunr-search`,
plugins: [
{
resolve: `gatsby-source-filesystem`,
options: {
path: `${__dirname}/src/pages`,
name: `pages`,
},
},
`gatsby-transformer-remark`,
{
resolve: `@gatsby-contrib/gatsby-plugin-elasticlunr-search`,
options: {
// Fields to index
fields: [`title`, `tags`],
// How to resolve each field`s value for a supported node type
resolvers: {
// For any node of type MarkdownRemark, list how to resolve the fields` values
MarkdownRemark: {
title: node => node.frontmatter.title,
path: node => node.frontmatter.path,
tags: node => node.frontmatter.tags,
},
},
},
},
],
}