Skip to content

Commit 761287a

Browse files
JulioJumeteorlxy
andauthored
docs: add plugin link in migration guide (#119)
Co-authored-by: meteorlxy <[email protected]>
1 parent f02bb0a commit 761287a

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

docs/guide/migration.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ See [Bundlers > Webpack](../reference/bundler/webpack.md)
100100
Removed.
101101

102102
Use [head](../reference/frontmatter.md#head) instead. For example:
103-
103+
104104
```yaml
105105
head:
106106
- - meta
@@ -153,15 +153,15 @@ If you are using default theme, the palette system is still available but migrat
153153

154154
#### .vuepress/enhanceApp.js
155155

156-
Renamed to `.vuepress/clientAppEnhance.{js,ts}`.
156+
Renamed to `.vuepress/clientAppEnhance.{js,ts}`.
157157

158158
The arguments of the function are changed, too.
159159

160160
#### .vuepress/components/
161161

162162
Files in this directory will not be registered as Vue components automatically.
163163

164-
You need to use `@vuepress/plugin-register-components`, or register your components manually in `.vuepress/clientAppEnhance.{js,ts}`.
164+
You need to use [@vuepress/plugin-register-components](../reference/plugin/register-components.md), or register your components manually in `.vuepress/clientAppEnhance.{js,ts}`.
165165

166166
#### .vuepress/theme/
167167

@@ -265,7 +265,7 @@ Some major breaking changes:
265265

266266
- There is no **conventional theme directory structure** anymore.
267267
- The file `theme/enhanceApp.js` or `theme/clientAppEnhance.{js,ts}` will not be used as client app enhance file implicitly. You need to specify it explicitly in `clientAppEnhanceFiles` hook.
268-
- Files in `theme/global-components/` directory will not be registered as Vue components automatically. You need to use `@vuepress/plugin-register-components`, or register components manually in `clientAppEnhance.{js,ts}`.
268+
- Files in `theme/global-components/` directory will not be registered as Vue components automatically. You need to use [@vuepress/plugin-register-components](../reference/plugin/register-components.md), or register components manually in `clientAppEnhance.{js,ts}`.
269269
- Files in `theme/layouts/` directory will not be registered as layout components automatically. You need to specify it explicitly in `layouts` option.
270270
- Files in `theme/templates/` directory will not be used as dev / ssr template automatically.
271271
- Always provide a theme entry file, and do not use `"main": "layouts/Layout.vue"` as the theme entry.

docs/zh/guide/migration.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ VuePress v2 的核心思想和流程是和 v1 一致的,但 v2 API 经过了
100100
移除。
101101

102102
改为使用 [head](../reference/frontmatter.md#head) 。例如:
103-
103+
104104
```yaml
105105
head:
106106
- - meta
@@ -161,7 +161,7 @@ VuePress v1 的 Stylus 调色板系统 (即 `styles/palette.styl` 和 `styles/
161161

162162
在该目录下的文件不会被自动注册为 Vue 组件。
163163

164-
你需要使用 `@vuepress/plugin-register-components` ,或者在 `.vuepress/clientAppEnhance.{js,ts}` 中手动注册你的组件。
164+
你需要使用 [@vuepress/plugin-register-components](../reference/plugin/register-components.md) ,或者在 `.vuepress/clientAppEnhance.{js,ts}` 中手动注册你的组件。
165165

166166
#### .vuepress/theme/
167167

@@ -265,7 +265,7 @@ v1 的主题和插件和 v2 并不兼容。
265265

266266
- 所谓的 **主题目录结构约定** 不再存在。
267267
- `theme/enhanceApp.js``theme/clientAppEnhance.{js,ts}` 文件不会被隐式作为 Client App Enhance 文件。你需要在 `clientAppEnhanceFiles` Hook 中显式指定它。
268-
- `theme/global-components/` 目录下的文件不会被自动注册为 Vue 组件。你需要使用 `@vuepress/plugin-register-components` ,或者在 `clientAppEnhance.{js,ts}` 中手动注册组件。
268+
- `theme/global-components/` 目录下的文件不会被自动注册为 Vue 组件。你需要使用 [@vuepress/plugin-register-components](../reference/plugin/register-components.md) ,或者在 `clientAppEnhance.{js,ts}` 中手动注册组件。
269269
- `theme/layouts/` 目录下的文件不会被自动注册为布局组件。你需要通过 `layouts` 配置项来显式指定。
270270
- `theme/templates/` 目录下的文件不会被自动作为 dev / ssr 的模板。
271271
- 你始终需要提供主题入口文件,并且不要使用 `"main": "layouts/Layout.vue"` 作为主题入口。

0 commit comments

Comments
 (0)