Closed anitsh closed 4 years ago
Description:
keywords
{ resolve: 'gatsby-plugin-lunr', options: { languages: [{ name: 'en' }], fields: [ { name: 'title', store: true, attributes: { boost: 20 } }, { name: 'subtitle', store: true, attributes: { boost: 5 } }, { name: 'content' }, { name: 'slug', store: true }, { name: 'date', store: true }, { name: 'keywords', store: true }, ], resolvers: { Mdx: { title: node => node.frontmatter.title, subtitle: node => node.frontmatter.subtitle, content: node => node.rawBody, date: node => node.frontmatter.date, slug: node => `/posts/${node.frontmatter.slug}`, keywords: node => node.formatter.keywords, // ERROR }, },
"gatsby-plugin-lunr" threw an error while running the onPostBootstrap lifecycle: Cannot read property 'keywords' of undefined
Solution:
keywords: node => node.frontmatter.keywords, // Fixed by replacing `formatter` with `frontmatter`
Description:
keywords
fieldSolution: