Replies: 1 comment
-
import { defineConfig, useRoute, mar } from "vitepress";
import markdownItContainer from "markdown-it-container";
export default defineConfig({
ignoreDeadLinks: true,
srcExclude: ["**/includes/*.md"],
themeConfig: {
},
locales: {
},
markdown: {
config: (md) => {
md.use(markdownItContainer, "quote", {
render: (tokens, idx) => {
var m = tokens[idx].info.trim().match(/^quote\s+(.*)$/);
const token = tokens[idx]
if (token.nesting === 1) {
return `<div class="quote custom-block"><p class="quote-title">` + md.utils.escapeHtml(m[1]) + `</p>\n`;
} else {
return `</div>\n`;
}
},
});
},
},
}); |
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
-
::: test
?
:::
Is it possible to extend custom containers?
Beta Was this translation helpful? Give feedback.
All reactions