import Markdown from 'vite-plugin-vue-markdown' import LinkAttributes from 'markdown-it-link-attributes' import Shiki from 'markdown-it-shiki' export default (viteEnv: ImportMetaEnv) => { // https://github.com/antfu/vite-plugin-vue-markdown // Don't need this? Try vitesse-lite: https://github.com/antfu/vitesse-lite return Markdown({ wrapperClasses: 'prose prose-sm m-auto text-left', headEnabled: true, markdownItSetup(md) { // https://prismjs.com/ md.use(Shiki, { theme: { light: 'vitesse-light', dark: 'vitesse-dark', }, }) md.use(LinkAttributes, { matcher: (link: string) => /^https?:\/\//.test(link), attrs: { target: '_blank', rel: 'noopener', }, }) }, }) }