Skip to content

Commit ee44955

Browse files
nekomeowwwnorthword
andcommitted
docs: migration guide for 2.0.0-rc11
Signed-off-by: Neko Ayaka <neko@ayaka.moe> Co-authored-by: Northword <44738481+northword@users.noreply.github.com>
1 parent da82b30 commit ee44955

2 files changed

Lines changed: 14 additions & 0 deletions

File tree

‎docs/pages/en/releases/migrations/v1-to-v2.md‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,13 @@ import '@nolebase/vitepress-plugin-highlight-targeted-heading/dist/style.css' //
202202
import '@nolebase/vitepress-plugin-highlight-targeted-heading/client/style.css' // [!code ++]
203203
```
204204
205+
## Git-based page histories
206+
207+
1. `includeDirs` and `includeExtensions` have been deprecated and merged into `include`, which is a list of glob modes with `!` negation.
208+
2. If a renderable page file located outside of the VitePress root (where `.vitepress` lives), please configure the `cwd` (current working directory) to the parent directory of the page files. (For example, in a Monorepo, if the source file that rendered a page s located outside of `docs/`, you need to set `cwd` to the root directory of the Monorepo instead of the root of VitePress.)
209+
3. No longer needed to configure `rewritePaths`, therefor `rewritePaths` is now deprecated, can be safely removed.
210+
4. `rewritePaths` pattern should be configured in the against to filesystem paths, not the URL route paths.
211+
205212
## Previewing image (social media card) generation
206213
207214
There are some breaking changes in the `@nolebase/vitepress-plugin-og-image` plugin.

‎docs/pages/zh-CN/releases/migrations/v1-to-v2.md‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,13 @@ import '@nolebase/vitepress-plugin-highlight-targeted-heading/dist/style.css' //
202202
import '@nolebase/vitepress-plugin-highlight-targeted-heading/client/style.css' // [!code ++]
203203
```
204204
205+
## 基于 Git 的页面历史
206+
207+
1.`includeDirs` 和 `includeExtensions` 已被弃用并合并到 `include` 中,配置时,可以使用带有 `!` 作为否定的 glob 匹配模式。
208+
2.如果最终会被渲染的文件所对应的页面文件位于 VitePress 根目录(即 `.vitepress`所在目录)之外,**请将 `cwd`(当前工作目录)配置为页面文件的父目录**。(例如,在 Monorepo 中,如果需要读取 `docs/` 以外的文件,则需要将 `cwd` 设置为 Monorepo 的根目录,而不是 VitePress 的根目录)。
209+
3.不再需要配置 `rewritePaths`,因此 `rewritePaths` 已被弃用,可以安全删除。
210+
4.`rewritePaths` 模式应配置为针对文件系统路径,而不是 URL 路由路径。
211+
205212
## 预览图片(社交媒体卡片)生成
206213
207214
在 `@nolebase/vitepress-plugin-og-image` 插件中有一些破坏性更改。

0 commit comments

Comments
 (0)