diff --git a/docs/guide/page.md b/docs/guide/page.md index b2a6f3bae4..2c627c8aea 100644 --- a/docs/guide/page.md +++ b/docs/guide/page.md @@ -31,6 +31,8 @@ Take the `docs` directory as your [sourceDir](../reference/cli.md), e.g. you are 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. 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. + +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. ::: ## Frontmatter diff --git a/docs/zh/guide/page.md b/docs/zh/guide/page.md index b3fea923fd..195aa649d6 100644 --- a/docs/zh/guide/page.md +++ b/docs/zh/guide/page.md @@ -31,6 +31,8 @@ VuePress 是以 Markdown 为中心的。你项目中的每一个 Markdown 文件 默认配置下, `README.md` 和 `index.md` 都会被转换成 `index.html` ,并且其对应的路由路径都是由斜杠结尾的。然而,如果你想同时保留这两个文件,就可能会造成冲突。 在这种情况下,你可以设置 [pagePatterns](../reference/config.md#pagepatterns) 来避免某个文件被 VuePress 处理,例如使用 `['**/*.md', '!**/README.md', '!.vuepress', '!node_modules']` 来排除所有的 `README.md` 文件。 + +此外,一些符号如 `:` 和 `+` 可能对 vue-router 有特殊含义,因此你应该避免使用它们,请参阅 [vue-router 文档](https://router.vuejs.org/zh/guide/essentials/route-matching-syntax.html) 了解更多详情。 ::: ## Frontmatter