mirror of https://github.com/vuejs/vitepress
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
949 B
31 lines
949 B
3 years ago
|
# Migration from VuePress
|
||
|
|
||
2 years ago
|
## Config
|
||
|
|
||
|
### Sidebar
|
||
|
|
||
|
The sidebar is no longer automatically populated from frontmatter. You can [read the frontmatter yourself](https://github.com/vuejs/vitepress/issues/572#issuecomment-1170116225) to dynamically populate the sidebar. [Additional utilities for this](https://github.com/vuejs/vitepress/issues/96) may be provided in the future.
|
||
|
|
||
2 years ago
|
## Markdown
|
||
|
|
||
|
### Images
|
||
|
|
||
2 years ago
|
Unlike VuePress, VitePress handles [`base`](./asset-handling#base-url) of your config automatically when you use static image.
|
||
2 years ago
|
|
||
|
Hence, now you can render images without `img` tag.
|
||
|
|
||
|
```diff
|
||
|
- <img :src="$withBase('/foo.png')" alt="foo">
|
||
|
+ ![foo](/foo.png)
|
||
|
```
|
||
|
|
||
|
::: warning
|
||
2 years ago
|
For dynamic images you still need `withBase` as shown in [Base URL guide](./asset-handling#base-url).
|
||
2 years ago
|
:::
|
||
|
|
||
|
Use `<img.*withBase\('(.*)'\).*alt="([^"]*)".*>` regex to find and replace it with `![$2]($1)` to replace all the images with `![](...)` syntax.
|
||
|
|
||
|
---
|
||
|
|
||
|
more to follow...
|