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

docs: add markdown image syntax migration guide (close #1373) #1420

Merged
merged 2 commits into from
Oct 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
13 changes: 11 additions & 2 deletions docs/guide/migration.md
Original file line number Diff line number Diff line change
Expand Up @@ -239,9 +239,18 @@ This directory will not be used as local theme implicitly if it is existed.

You need to import and set your local theme via [theme](../reference/config.md#theme) option.

### Markdown slot Change
### Markdown Change

Markdown slot is no longer supported.
- Markdown slot is no longer supported.
- Markdown image syntax does not support webpack aliases anymore. Links without `./` prefix are also treated as relative links, which is aligned with the behavior of the native markdown image syntax. If you want to use aliases in image paths, or use images from external packages, you should use `<img>` tag instead.

```diff
- ![](@alias/foo.png)
- ![](package-name/bar.png)

+ <img src="@alias/foo.png">
+ <img src="package-name/bar.png">
```

### CLI Change

Expand Down
13 changes: 11 additions & 2 deletions docs/zh/guide/migration.md
Original file line number Diff line number Diff line change
Expand Up @@ -239,9 +239,18 @@ VuePress v1 的 Stylus 调色板系统 (即 `styles/palette.styl` 和 `styles/

你需要在 [theme](../reference/config.md#theme) 配置项中显式引入并使用本地主题。

### Markdown 插槽变更
### Markdown 变更

Markdown 插槽不再被支持。
- Markdown 插槽不再被支持。
- Markdown 图片语法不再支持 Webpack 别名。不以 `./` 开头的链接也会被识别为相对路径,这与原生 Markdown 图片语法的行为一致。如果你想要使用 Webpack 别名,或者使用来自外部包的图片,你应该使用 `<img>` 标签。

```diff
- ![](@alias/foo.png)
- ![](package-name/bar.png)

+ <img src="@alias/foo.png">
+ <img src="package-name/bar.png">
```

### CLI 变更

Expand Down