Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/mdit-vue/mdit-vue

markdown-it plugins for Vue.js
https://github.com/mdit-vue/mdit-vue

markdown markdown-it-plugin vue

Last synced: 7 days ago
JSON representation

markdown-it plugins for Vue.js

Awesome Lists containing this project

README

        



mdit-vue


mdit-vue



github check


coverage


license

> [markdown-it](https://github.com/markdown-it/markdown-it) plugins for [Vue.js](https://github.com/vuejs/core)

## Why?

As we know, [Markdown](https://www.markdownguide.org/getting-started/) could be converted into HTML, and raw HTML is supported by most of the Markdown parsers.

Since the [Vue template syntax](https://vuejs.org/guide/essentials/template-syntax.html) is HTML-based, and all Vue templates are syntactically valid HTML, it's quite straight forward to think that we could use Vue template syntax in [Markdown](https://en.wikipedia.org/wiki/Markdown).

Unlike [JSX](https://reactjs.org/docs/introducing-jsx.html), Vue template syntax is naturally compatible with Markdown syntax, so we don't have to make lots of extensions or limitations to Markdown syntax like [MDX](https://mdxjs.com/). However, we still need to make some modifications to the parser so that Markdown could have more fun with Vue.

There has been lots of projects that built with this idea, but they are using different ways to modify the Markdown parsers. Most of them don't strictly follow the [Markdown specification](https://commonmark.org/) and have various minor errors.

This project is here to provide some unified plugins for [markdown-it](https://github.com/markdown-it/markdown-it), one of the most popular markdown parsers in JS world, to make it work better with Vue.

## Packages

| Package | Version (click for changelogs) |
| ----------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- |
| [@mdit-vue/plugin-component](packages/plugin-component) | [![plugin-component version](https://badgen.net/npm/v/@mdit-vue/plugin-component)](packages/plugin-component/CHANGELOG.md) |
| [@mdit-vue/plugin-frontmatter](packages/plugin-frontmatter) | [![plugin-frontmatter version](https://badgen.net/npm/v/@mdit-vue/plugin-frontmatter)](packages/plugin-frontmatter/CHANGELOG.md) |
| [@mdit-vue/plugin-headers](packages/plugin-headers) | [![plugin-headers version](https://badgen.net/npm/v/@mdit-vue/plugin-headers)](packages/plugin-headers/CHANGELOG.md) |
| [@mdit-vue/plugin-sfc](packages/plugin-sfc) | [![plugin-sfc version](https://badgen.net/npm/v/@mdit-vue/plugin-sfc)](packages/plugin-sfc/CHANGELOG.md) |
| [@mdit-vue/plugin-title](packages/plugin-title) | [![plugin-title version](https://badgen.net/npm/v/@mdit-vue/plugin-title)](packages/plugin-title/CHANGELOG.md) |
| [@mdit-vue/plugin-toc](packages/plugin-toc) | [![plugin-toc version](https://badgen.net/npm/v/@mdit-vue/plugin-title)](packages/plugin-toc/CHANGELOG.md) |

## Who is using?

This project was originally extracted from Vue's official project, and maintained by Vue team members. It is supporting many awesome projects:

- [Slidev](https://github.com/slidevjs/slidev)
- [unplugin-vue-markdown](https://github.com/unplugin/unplugin-vue-markdown)
- [VitePress](https://github.com/vuejs/vitepress)
- [VuePress v2](https://github.com/vuepress/vuepress-next)
- ... and so on

## License

[MIT](https://github.com/mdit-vue/mdit-vue/blob/main/LICENSE) © [mdit-vue Contributors](https://github.com/mdit-vue/mdit-vue/graphs/contributors)