Merge pull request #83 from DLevai94/patch-2

Remove /404 & /blog/[...slug] from sitemap
This commit is contained in:
Timothy
2021-06-20 23:04:11 +08:00
committed by GitHub

View File

@ -28,6 +28,9 @@ const siteMetadata = require('../data/siteMetadata')
.replace('.md', '')
.replace('/index.xml', '')
const route = path === '/index' ? '' : path
if (page === `pages/404.js` || page === `pages/blog/[...slug].js`) {
return
}
return `
<url>
<loc>${siteMetadata.siteUrl}${route}</loc>