|
|
@ -22,8 +22,13 @@ export function withBase(path: string) {
|
|
|
|
export function pathToFile(path: string): string {
|
|
|
|
export function pathToFile(path: string): string {
|
|
|
|
let pagePath = path.replace(/\.html$/, '')
|
|
|
|
let pagePath = path.replace(/\.html$/, '')
|
|
|
|
pagePath = decodeURIComponent(pagePath)
|
|
|
|
pagePath = decodeURIComponent(pagePath)
|
|
|
|
if (pagePath.endsWith('/')) {
|
|
|
|
if (siteDataRef.value.cleanUrls === 'off' && pagePath.endsWith('/')) {
|
|
|
|
pagePath += 'index'
|
|
|
|
pagePath += 'index'
|
|
|
|
|
|
|
|
} else if (
|
|
|
|
|
|
|
|
siteDataRef.value.cleanUrls === 'with-trailing-slash' &&
|
|
|
|
|
|
|
|
pagePath.endsWith('/')
|
|
|
|
|
|
|
|
) {
|
|
|
|
|
|
|
|
pagePath = pagePath.slice(0, -1)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (import.meta.env.DEV) {
|
|
|
|
if (import.meta.env.DEV) {
|
|
|
|