fix: chinese filenames can't build (#217) (#262)

pull/312/head
heny 4 years ago committed by GitHub
parent 71a5e1c2a2
commit b940397cd0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -14,6 +14,7 @@ export function joinPath(base: string, path: string): 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)
if (pagePath.endsWith('/')) { if (pagePath.endsWith('/')) {
pagePath += 'index' pagePath += 'index'
} }

Loading…
Cancel
Save