Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

md文件的文件名是中文,无法生成sidebar #628

Closed
nabaonan opened this issue Jul 3, 2018 · 7 comments
Closed

md文件的文件名是中文,无法生成sidebar #628

nabaonan opened this issue Jul 3, 2018 · 7 comments

Comments

@nabaonan
Copy link

nabaonan commented Jul 3, 2018

Bug report

Version

Steps to reproduce

创建一个中文markdown文件,比如"权限管理.md",然后在.vuepress/config.js中配置sidebar 代码如下

sidebar: {
     '/front/vue/': [
       ['', 'vue首页'],
       ['权限管理'],
     ],
     '/front/': [
       ['', '前端首页']
     ],
     ]
   },

然后文档路径如下

│  README.md
│
├─.vuepress
│      config.js
│      dist.zip
│
├─back
│  │  README.md
│  │
│  └─python
│          headfirst-python3-note.md
│          README.md
│
├─front
│  │  README.md
│  │
│  ├─css
│  │      README.md
│  │
│  ├─es6
│  │      README.md
│  │
│  └─vue
│      │  authority.md
│      │  README.md
│      │  vuepress.md
│      │  权限管理.md
│      │
│      └─images
│              vuepress-1.png
│
└─server
        README.md

只要是markdown文件名字是中文,就生成不出sidebar,不知道为啥,求解

What is expected?

期待无论是文档名字是中文还是英文,渲染后都应该能出现左边栏

What is actually happening?

如果文档的标题是中文的话,左边栏渲染不出

Other relevant information

  • Your OS: windows 7
  • Node.js version: 8.11
  • Browser version: chrome 65.0.3325.181
  • Is this a global or local install? local install
  • Which package manager did you use for the install?npm
@nabaonan nabaonan changed the title 文本是中文无法生成sidebar 文本名字是中文,无法生成sidebar Jul 3, 2018
@nabaonan nabaonan changed the title 文本名字是中文,无法生成sidebar md文件的文件名是中文,无法生成sidebar Jul 3, 2018
@ulivz ulivz closed this as completed in 8837e7a Jul 3, 2018
@ulivz
Copy link
Member

ulivz commented Jul 3, 2018

Fixed at 8837e7a, will be released in 0.11.0.

@hustjiangtao
Copy link

之前我提过相关的问题,后来测试的时候发现,中文标题是可以生成sidebar的,但是在刷新该页面或者是直接在浏览器打开该链接的时候会得到一个404的结果,实际上是因为中文字符转义的原因,在刷新的时在router中找不到对应的链接。目前不知道有没有解决这个问题,我还没有升级到最新版本。

@qinjialei24
Copy link

{
title: 'electron踩坑',
collapsable: true,
children: [
encodeURI('/electron/设置透明窗口时的兼容性问题')
]
},

拿走不谢,亲测可以用

@longhaoxuan
Copy link

咋就关闭了 这个问题解决了吗?????

@MechaGirls
Copy link

咋就关闭了 这个问题解决了吗?????

因为没有按照模版来创建问题

@chenbimo
Copy link

chenbimo commented Mar 8, 2022

{ title: 'electron踩坑', collapsable: true, children: [ encodeURI('/electron/设置透明窗口时的兼容性问题') ] },

拿走不谢,亲测可以用

天才的想法!

@Vsnoy
Copy link

Vsnoy commented Aug 6, 2022

{ title: 'electron踩坑', collapsable: true, children: [ encodeURI('/electron/设置透明窗口时的兼容性问题') ] },

拿走不谢,亲测可以用

tql,帮大忙了,感谢!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants