在 vitepress 内如何使用 @vuepress/markdown 的 importCodePlugin 插件? #1635
-
在 vitepress 内如何使用 @vuepress/markdown 的 importCodePlugin 插件?我非常喜欢 vuepress 的 请问我应该怎么在 vitepress 项目内使用 @vuepress/markdown 的 importCodePlugin 插件? 请问下面的配置方式对么? import{defineConfig,typeDefaultTheme}from"vitepress";import{importCodePlugin}from"@vuepress/markdown";exportdefaultdefineConfig({/** * @see https://vitepress.dev/zh/guide/markdown#advanced-configuration */markdown: {config: (md)=>{md.use(importCodePlugin,{handleImportPath: (str)=>join(process.cwd(),str)});},},}); |
BetaWas this translation helpful?Give feedback.
Answered by Mister-Hope Feb 25, 2025
Replies: 1 comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
不确定,env的结构可能不同,我们不保证任何插件兼容vitepress系统也不会主动进行任何兼容。 我更建议你把相关代码提取出来自己维护。 |
BetaWas this translation helpful?Give feedback.
0 replies
Answer selected byMister-Hope
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment
不确定,env的结构可能不同,我们不保证任何插件兼容vitepress系统也不会主动进行任何兼容。
我更建议你把相关代码提取出来自己维护。