Skip to content

Commit 1fe9635

Browse files
authored
docs: add hint about route path (close #1293) (#1312)
1 parent 5d60575 commit 1fe9635

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

docs/guide/page.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ Take the `docs` directory as your [sourceDir](../reference/cli.md), e.g. you are
3131
By default, both `README.md` and `index.md` would be converted to `index.html` and generate a slash-ending route path. However, it might cause conflicts if you want to keep both of the two files.
3232

3333
In such case, you can set the [pagePatterns](../reference/config.md#pagepatterns) to avoid one of them being processed by VuePress, e.g. use `['**/*.md', '!**/README.md', '!.vuepress', '!node_modules']` to exclude all `README.md` files.
34+
35+
Also, some symbols like `:` and `+` may have special meanings for vue-router, so you should avoid using them, see [vue-router docs](https://router.vuejs.org/guide/essentials/route-matching-syntax.html) for more details.
3436
:::
3537

3638
## Frontmatter

docs/zh/guide/page.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ VuePress 是以 Markdown 为中心的。你项目中的每一个 Markdown 文件
3131
默认配置下, `README.md``index.md` 都会被转换成 `index.html` ,并且其对应的路由路径都是由斜杠结尾的。然而,如果你想同时保留这两个文件,就可能会造成冲突。
3232

3333
在这种情况下,你可以设置 [pagePatterns](../reference/config.md#pagepatterns) 来避免某个文件被 VuePress 处理,例如使用 `['**/*.md', '!**/README.md', '!.vuepress', '!node_modules']` 来排除所有的 `README.md` 文件。
34+
35+
此外,一些符号如 `:``+` 可能对 vue-router 有特殊含义,因此你应该避免使用它们,请参阅 [vue-router 文档](https://router.vuejs.org/zh/guide/essentials/route-matching-syntax.html) 了解更多详情。
3436
:::
3537

3638
## Frontmatter

0 commit comments

Comments
 (0)