Commit 93b2ca1 1 parent f516cb4 commit 93b2ca1 Copy full SHA for 93b2ca1
File tree 1 file changed +3
-3
lines changed
packages/@vuepress/core/lib/node/build
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -133,7 +133,7 @@ module.exports = class Build extends EventEmitter {
133
133
*/
134
134
135
135
async renderPage ( page ) {
136
- const pagePath = page . path
136
+ const pagePath = decodeURIComponent ( page . path )
137
137
readline . clearLine ( process . stdout , 0 )
138
138
readline . cursorTo ( process . stdout , 0 )
139
139
process . stdout . write ( `Rendering page: ${ pagePath } ` )
@@ -143,7 +143,7 @@ module.exports = class Build extends EventEmitter {
143
143
const pageMeta = renderPageMeta ( meta )
144
144
145
145
const context = {
146
- url : pagePath ,
146
+ url : page . path ,
147
147
userHeadTags : this . userHeadTags ,
148
148
pageMeta,
149
149
title : 'VuePress' ,
@@ -158,7 +158,7 @@ module.exports = class Build extends EventEmitter {
158
158
console . error ( logger . error ( chalk . red ( `Error rendering ${ pagePath } :` ) , false ) )
159
159
throw e
160
160
}
161
- const filename = decodeURIComponent ( pagePath . replace ( / \/ $ / , '/index.html' ) . replace ( / ^ \/ / , '' ) )
161
+ const filename = pagePath . replace ( / \/ $ / , '/index.html' ) . replace ( / ^ \/ / , '' )
162
162
const filePath = path . resolve ( this . outDir , filename )
163
163
await fs . ensureDir ( path . dirname ( filePath ) )
164
164
await fs . writeFile ( filePath , html )
You can’t perform that action at this time.
0 commit comments