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.
25 lines
620 B
25 lines
620 B
# Migration from VuePress
|
|
|
|
## Markdown
|
|
|
|
### Images
|
|
|
|
Unlike VuePress, VitePress handles [`base`](/guide/asset-handling.html#base-url) of your config automatically when you use static image.
|
|
|
|
Hence, now you can render images without `img` tag.
|
|
|
|
```diff
|
|
- <img :src="$withBase('/foo.png')" alt="foo">
|
|
+ 
|
|
```
|
|
|
|
::: warning
|
|
For dynamic images you still need `withBase` as shown in [Base URL guide](/guide/asset-handling.html#base-url).
|
|
:::
|
|
|
|
Use `<img.*withBase\('(.*)'\).*alt="([^"]*)".*>` regex to find and replace it with `` to replace all the images with `` syntax.
|
|
|
|
---
|
|
|
|
more to follow...
|