|
|
@ -35,7 +35,8 @@ export function pathToFile(path: string): string {
|
|
|
|
// /foo/bar.html -> ./foo_bar.md
|
|
|
|
// /foo/bar.html -> ./foo_bar.md
|
|
|
|
if (inBrowser) {
|
|
|
|
if (inBrowser) {
|
|
|
|
const base = import.meta.env.BASE_URL
|
|
|
|
const base = import.meta.env.BASE_URL
|
|
|
|
pagePath = pagePath.slice(base.length).replace(/\//g, '_') + '.md'
|
|
|
|
pagePath =
|
|
|
|
|
|
|
|
(pagePath.slice(base.length).replace(/\//g, '_') || 'index') + '.md'
|
|
|
|
// client production build needs to account for page hash, which is
|
|
|
|
// client production build needs to account for page hash, which is
|
|
|
|
// injected directly in the page's html
|
|
|
|
// injected directly in the page's html
|
|
|
|
const pageHash = __VP_HASH_MAP__[pagePath.toLowerCase()]
|
|
|
|
const pageHash = __VP_HASH_MAP__[pagePath.toLowerCase()]
|
|
|
|