|
|
|
@ -10,9 +10,9 @@ The sidebar is no longer automatically populated from frontmatter. You can [read
|
|
|
|
|
|
|
|
|
|
### Images
|
|
|
|
|
|
|
|
|
|
Unlike VuePress, VitePress handles [`base`](./asset-handling#base-url) of your config automatically when you use static image.
|
|
|
|
|
Unlike VuePress, VitePress handles [`base`](./asset-handling#base-url) of your config automatically when you use a static image.
|
|
|
|
|
|
|
|
|
|
Hence, now you can render images without `img` tag.
|
|
|
|
|
As a result, you can render images without needing an `img` tag.
|
|
|
|
|
|
|
|
|
|
```diff
|
|
|
|
|
- <img :src="$withBase('/foo.png')" alt="foo">
|
|
|
|
@ -20,7 +20,7 @@ Hence, now you can render images without `img` tag.
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
::: warning
|
|
|
|
|
For dynamic images you still need `withBase` as shown in [Base URL guide](./asset-handling#base-url).
|
|
|
|
|
For dynamic images, you still need `withBase` as shown in [Base URL guide](./asset-handling#base-url).
|
|
|
|
|
:::
|
|
|
|
|
|
|
|
|
|
Use `<img.*withBase\('(.*)'\).*alt="([^"]*)".*>` regex to find and replace it with `` to replace all the images with `` syntax.
|
|
|
|
|