
Security News
Meet Socket at Black Hat and DEF CON 2025 in Las Vegas
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
Render markdown with your Vue components.
$ npm install markduckjs
or
$ yarn add markduckjs
<template>
<markduck :markdown="markdown"/>
</template>
<script>
import markduck from 'markduckjs';
import gemojiToEmoji from 'remark-gemoji-to-emoji';
import rehypePrism from '@mapbox/rehype-prism';
import 'prismjs/themes/prism.css';
import UnorderedList from '/your/custom/components/UnorderedList.vue';
import ListItem from '/your/custom/components/ListItem.vue';
import FigureImage from '/your/custom/components/FigureImage.vue';
export default {
data() {
return {
markdown: '# your markdown :duck:',
};
},
components: {
markduck: markduck({
remarkPlugins: [gemojiToEmoji],
rehypePlugins: [rehypePrism],
components: {
ul: UnorderedList,
li: ListItem,
img(nodeData) {
if (nodeData.attrs.alt) {
return FigureImage;
}
return undefined;
},
},
}),
},
};
Register Vue components corresponding to each HTML element.
Object
type ComponentRegisterFunc = (data: VNodeData) => VueConstructor<Vue> | undefined;
type ComponentRegisterOption = {
[keyof: string]: VueConstructor<Vue> | ComponentRegisterFunc;
};
{}
Remark plugins.
A part of lists is here 👉 github.com/remarkjs/remark/blob/master/doc/plugins.md#list-of-plugins
Array
of Plugin
or [Plugin, Settings]
(Plugin
and Settings
are from Unified.)
[]
Same as remarkPlugins.
Rehype plugins will run after remarkPlugins.
Clone and run:
npm run demo
remark-parser remark-rehype createElement
your markdown -> mdast -> hast -> vue
↑ ↑
your remark plugin your rehype plugin
FAQs
Render markdown with your Vue components.
The npm package markduckjs receives a total of 6 weekly downloads. As such, markduckjs popularity was classified as not popular.
We found that markduckjs demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
Security News
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600× faster than humans.
Security News
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.