import{_ as a,c as s,ag as t,o as r}from"./chunks/framework.C1C4sYC0.js";const u=JSON.parse('{"title":"从 VuePress 迁移","description":"","frontmatter":{},"headers":[],"relativePath":"zh/guide/migration-from-vuepress.md","filePath":"zh/guide/migration-from-vuepress.md","lastUpdated":1704148534000}'),o={name:"zh/guide/migration-from-vuepress.md"};function i(n,e,d,l,c,h){return r(),s("div",null,e[0]||(e[0]=[t(`

从 VuePress 迁移

配置

侧边栏不再从 frontmatter 中自动获取。你可以自行阅读 frontmatter 来动态填充侧边栏。迁移工具将来可能会提供。

Markdown

图片

与 VuePress 不同,在使用静态图片时,VitePress 会根据配置自动处理这些 base

因此,现在可以在没有 img 标签的情况下渲染图像。

diff
- <img :src="$withBase('/foo.png')" alt="foo">
+ ![foo](/foo.png)

WARNING

对于动态图像,仍然需要 withBase,如 Base URL 中所示。

使用 <img.*withBase\\('(.*)'\\).*alt="([^"]*)".*> 正则表达式查找并替换为 ![$2]($1)![](...) 语法替换所有图像。


更多请继续关注...

`,13)]))}const m=a(o,[["render",i]]);export{u as __pageData,m as default};