We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
yyx990803
kiaking
brc-dd
posva
Learn more about funding links in repositories.
Report abuse
1 parent 20b509c commit 481a5e3Copy full SHA for 481a5e3
src/node/build/generateSitemap.ts
@@ -17,11 +17,12 @@ export async function generateSitemap(siteConfig: SiteConfig) {
17
const getLastmod = async (url: string) => {
18
if (!siteConfig.lastUpdated) return undefined
19
20
- let path = url.replace(/(^|\/)$/, '$1index')
21
- path = path.replace(/(\.html)?$/, '.md')
22
- path = siteConfig.rewrites.inv[path] || path
+ let file = url.replace(/(^|\/)$/, '$1index')
+ file = file.replace(/(\.html)?$/, '.md')
+ file = siteConfig.rewrites.inv[file] || file
23
+ file = path.join(siteConfig.srcDir, file)
24
- return (await getGitTimestamp(path)) || undefined
25
+ return (await getGitTimestamp(file)) || undefined
26
}
27
28
await task('generating sitemap', async () => {
0 commit comments