Skip to content

Commit

Permalink
🐛 Fix sitemap
Browse files Browse the repository at this point in the history
  • Loading branch information
tomtuv committed Mar 19, 2021
1 parent 8b82678 commit 5e58416
Showing 1 changed file with 26 additions and 1 deletion.
27 changes: 26 additions & 1 deletion gatsby-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ module.exports = {
redirectComponent: require.resolve(`./src/components/seo.js`),
},
},
`gatsby-plugin-sitemap`,
`gatsby-plugin-image`,
{
resolve: `gatsby-source-filesystem`,
Expand Down Expand Up @@ -74,6 +73,32 @@ module.exports = {
trackingId: process.env.GOOGLE_ANALYTICS_TRACKING_ID,
},
},
{
resolve: `gatsby-plugin-sitemap`,
options: {
exclude: [`/*/404`, `/*/offline-plugin-app-shell-fallback`],
query: `{
site {
siteMetadata {
siteUrl
}
}
allSitePage(filter: {context: {intl: {routed: {eq: true}}}}) {
nodes {
path
}
}
}`,
serialize: ({ site, allSitePage }) =>
allSitePage.nodes.map(node => {
return {
url: `${site.siteMetadata.siteUrl}${node.path}`,
changefreq: `daily`,
priority: 0.7,
}
}),
},
},
`gatsby-plugin-offline`,
`gatsby-plugin-netlify`,
],
Expand Down

0 comments on commit 5e58416

Please sign in to comment.