UNPKG

@newrelic/gatsby-theme-newrelic

Version:

[![Community Project header](https://github.com/newrelic/opensource-website/raw/master/src/images/categories/Community_Project.png)](https://opensource.newrelic.com/oss-category/#community-project)

57 lines (56 loc) 1.33 kB
module.exports = ({ layout, newrelic, robots = {}, sitemap = true }) => { return { plugins: [ 'gatsby-plugin-emotion', 'gatsby-plugin-react-helmet', 'gatsby-plugin-portal', sitemap && { resolve: 'gatsby-plugin-sitemap', options: { output: '/', excludes: ['*/embed/'], }, }, 'gatsby-plugin-use-dark-mode', 'gatsby-transformer-sharp', { resolve: `gatsby-plugin-sharp`, options: { defaults: {}, }, }, layout?.component && { resolve: `gatsby-plugin-layout`, options: { component: layout.component, }, }, { resolve: 'gatsby-source-filesystem', options: { name: 'images', path: 'src/images', }, }, { resolve: 'gatsby-plugin-robots-txt', options: { sitemap: 'sitemap-index.xml', policy: [{ userAgent: '*', allow: '/' }], ...robots, }, }, newrelic && { resolve: 'gatsby-plugin-newrelic', options: newrelic, }, { resolve: 'gatsby-source-filesystem', options: { name: 'announcements', path: 'src/announcements', }, }, ].filter(Boolean), }; };