fix: use more specific match to replace path

This commit is contained in:
Timothy Lin 2021-03-15 23:17:04 +08:00
parent 81335f12f2
commit 0131149409

View File

@ -20,9 +20,9 @@ const siteMetadata = require('../data/siteMetadata')
${pages
.map((page) => {
const path = page
.replace('pages', '')
.replace('data', '')
.replace('public', '')
.replace('pages/', '/')
.replace('data/blog', '/blog')
.replace('public/', '/')
.replace('.js', '')
.replace('.mdx', '')
.replace('.md', '')