add tag routes to sitemap

This commit is contained in:
Timothy committed 2021-01-13 20:17:09 +08:00
1 parent 1c2f40424b
commit 9965355e45
3 files changed
+4 -5

No files matched your search

+3
View File
@@ -9,6 +9,7 @@ const siteMetadata = require('../data/siteMetadata')
'pages/*.js',
'data/**/*.mdx',
'data/**/*.md',
'public/tags/**/*.xml',
'!pages/_*.js',
'!pages/api',
])
@@ -21,9 +22,11 @@ const siteMetadata = require('../data/siteMetadata')
const path = page
.replace('pages', '')
.replace('data', '')
.replace('public', '')
.replace('.js', '')
.replace('.mdx', '')
.replace('.md', '')
.replace('/index.xml', '')
const route = path === '/index' ? '' : path
return `
<url>