refactor: directly use site.base instead of userConfig.base (#2223)

Co-authored-by: Divyansh Singh <40380293+brc-dd@users.noreply.github.com>
pull/2229/head
ChuHoMan 2 years ago committed by GitHub
parent 3cc93182bb
commit 7dfe9d2d43
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -97,7 +97,7 @@ export async function localSearchPlugin(
function getDocId(file: string) { function getDocId(file: string) {
let relFile = path.relative(siteConfig.srcDir, file) let relFile = path.relative(siteConfig.srcDir, file)
relFile = siteConfig.rewrites.map[relFile] || relFile relFile = siteConfig.rewrites.map[relFile] || relFile
let id = path.join(siteConfig.userConfig.base ?? '/', relFile) let id = path.join(siteConfig.site.base, relFile)
id = id.replace(/\.md$/, siteConfig.cleanUrls ? '' : '.html') id = id.replace(/\.md$/, siteConfig.cleanUrls ? '' : '.html')
return id return id
} }

Loading…
Cancel
Save