Replies: 1 comment
-
This can be done via a custom markdown-it plugin. But it would be better and easier to do (2) instead. There are already existing libraries like Basically, it would be like this: // .vitepress/theme/index.js
import DefaultTheme from 'vitepress/theme'
import Layout from './Layout.vue'
export default { ...DefaultTheme, Layout } <!--.vitepress/theme/Layout.vue-->
<script setup>
import DefaultTheme from 'vitepress/theme'
// TODO: initialize medium-zoom here on mount
</script>
<template>
<DefaultTheme.Layout />
</template> |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
通过官网了解,发现这种功能想要扩展:
不知道有没有办法可以直接改变 .md 的渲染,渲染到是图片的时候可以替换成别的组件这样
Beta Was this translation helpful? Give feedback.
All reactions