Closed
Description
- I confirm that this is an issue rather than a question.
Bug report
Steps to reproduce
file tree like below
.
├── 测试
│ └── README.md
I add a nav (/测试) , and I can route to the page successfully.
However, If I set permalink (e.g. /test
) to the README.md, vue-router failed to match the page.
What is expected?
vue-router can match the page
What is actually happening?
when setting permalink, the router config generated like below. vue-router failed to match correct page because of the encoded path.
{
path: "/%E6%B5%8B%E8%AF%95/index.html",
redirect: "/test/"
},
the correct router config should like this
{
path: "/测试/index.html",
redirect: "/test/"
},
vuepress/packages/@vuepress/core/lib/node/internal-plugins/routes.js
Lines 68 to 75 in c56d889
the problem caused by these codes,
regularPath
is encoded
Other relevant information
I am trying to generate sidebar/nav automatically, so folder name in Chinese is a useful info to me.
- Output of
npx vuepress info
in my VuePress project:
Environment Info:
System:
OS: macOS 10.15
CPU: (12) x64 Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz
Binaries:
Node: 11.12.0 - ~/.nvm/versions/node/v11.12.0/bin/node
Yarn: 1.19.0 - /usr/local/bin/yarn
npm: 6.7.0 - ~/.nvm/versions/node/v11.12.0/bin/npm
Browsers:
Chrome: 77.0.3865.90
Firefox: Not Found
Safari: 13.0.2
npmPackages:
@vuepress/core: 1.2.0
@vuepress/theme-default: 1.2.0
vuepress: ^1.0.3 => 1.2.0
npmGlobalPackages:
vuepress: Not Found