Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2022 Anthony Fu <https://github.com/antfu>
Copyright (c) 2026 Comark team and contributors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
60 changes: 29 additions & 31 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
# markdown-it-mdc
# markdown-it-comark

[![npm version][npm-version-src]][npm-version-href]
[![npm downloads][npm-downloads-src]][npm-downloads-href]
[![bundle][bundle-src]][bundle-href]
[![JSDocs][jsdocs-src]][jsdocs-href]
[![License][license-src]][license-href]

[MDC (Markdown Components)](https://content.nuxtjs.org/guide/writing/mdc) for [`markdown-it`](https://github.com/markdown-it/markdown-it).
[Comark (Component in Markdown)](https://comark.dev) for [`markdown-it`](https://github.com/markdown-it/markdown-it).

Use [VS Code MDC Extension](https://marketplace.visualstudio.com/items?itemName=Nuxt.mdc) for IDE support.

## Usage

```bash
npm i markdown-it markdown-it-mdc
npm i markdown-it markdown-it-comark
```

```ts
import MarkdownIt from 'markdown-it'
import pluginMdc from 'markdown-it-mdc'
import comark from 'markdown-it-comark'

const md = new MarkdownIt()
.use(pluginMdc)
.use(comark)

const result = md.render(`
# Hello
Expand All @@ -32,38 +32,36 @@ Hello **World** with :my-component{.text-red name="foo"}!

## Features

This plugin implements all the syntaxes documented in [MDC Syntax](https://content.nuxtjs.org/guide/writing/mdc). We are still testing behavior compatibility in detail before reaching `v0.1.0`.
This plugin implements all the syntaxes documented in [Comark Syntax](https://comark.dev/syntax/markdown). We are still testing behavior compatibility in detail before reaching `v1.0.0`.

- [x] [Block Component](https://content.nuxtjs.org/guide/writing/mdc#block-components)
- [x] [Nesting](https://content.nuxtjs.org/guide/writing/mdc#nesting)
- [x] [YAML Props](https://content.nuxtjs.org/guide/writing/mdc#yaml-props)
- [x] [Slots](https://content.nuxtjs.org/guide/writing/mdc#slots)
- [x] [Inline Components](https://content.nuxtjs.org/guide/writing/mdc#inline-components)
- [x] [Inline Props](https://content.nuxtjs.org/guide/writing/mdc#props)
- [x] [Span](https://content.nuxtjs.org/guide/writing/mdc#span-text)
- ~~Frontmatter~~. Frontmatter is not built-in in this plugin, we recommend using [`@mdit-vue/plugin-frontmatter`](https://github.com/mdit-vue/mdit-vue/tree/main/packages/plugin-frontmatter) instead.
- [x] [Block Component](https://comark.dev/syntax/markdown#block-components)
- [x] [Nesting](https://comark.dev/syntax/markdown#nested-components)
- [x] [YAML Props](https://comark.dev/syntax/markdown#yaml-props)
- [x] [Slots](https://comark.dev/syntax/markdown#component-slots)
- [x] [Inline Components](https://comark.dev/syntax/markdown#inline-components)
- [x] [Inline Props](https://comark.dev/syntax/markdown#attributes)
- [x] [Span](https://comark.dev/syntax/markdown#span-text)
- ~~Frontmatter~~. Frontmatter is not built-in in this plugin, we recommend using [`@mdit-vue/plugin-frontmatter`](https://github.com/mdit-vue/mdit-vue/tree/main/packages/plugin-frontmatter) if you want to use this plugin outside of Comark package,

## Sponsors
## License

<p align="center">
<a href="https://cdn.jsdelivr.net/gh/antfu/static/sponsors.svg">
<img src='https://cdn.jsdelivr.net/gh/antfu/static/sponsors.svg'/>
</a>
</p>
Made with ❤️

## License
Published under MIT License.

## Credits

[MIT](./LICENSE) License © 2022 [Anthony Fu](https://github.com/antfu)
❤️ This project was originally created by [Anthony Fu](https://github.com/antfu) in 2022. Special thanks for the amazing work and inspiration! 🙏✨

<!-- Badges -->

[npm-version-src]: https://img.shields.io/npm/v/markdown-it-mdc?style=flat&colorA=080f12&colorB=1fa669
[npm-version-href]: https://npmjs.com/package/markdown-it-mdc
[npm-downloads-src]: https://img.shields.io/npm/dm/markdown-it-mdc?style=flat&colorA=080f12&colorB=1fa669
[npm-downloads-href]: https://npmjs.com/package/markdown-it-mdc
[bundle-src]: https://img.shields.io/bundlephobia/minzip/markdown-it-mdc?style=flat&colorA=080f12&colorB=1fa669&label=minzip
[bundle-href]: https://bundlephobia.com/result?p=markdown-it-mdc
[license-src]: https://img.shields.io/github/license/nuxt-content/markdown-it-mdc.svg?style=flat&colorA=080f12&colorB=1fa669
[license-href]: https://github.com/nuxt-content/markdown-it-mdc/blob/main/LICENSE
[npm-version-src]: https://img.shields.io/npm/v/markdown-it-comark?style=flat&colorA=080f12&colorB=1fa669
[npm-version-href]: https://npmjs.com/package/markdown-it-comark
[npm-downloads-src]: https://img.shields.io/npm/dm/markdown-it-comark?style=flat&colorA=080f12&colorB=1fa669
[npm-downloads-href]: https://npmjs.com/package/markdown-it-comark
[bundle-src]: https://img.shields.io/bundlephobia/minzip/markdown-it-comark?style=flat&colorA=080f12&colorB=1fa669&label=minzip
[bundle-href]: https://bundlephobia.com/result?p=markdown-it-comark
[license-src]: https://img.shields.io/github/license/nuxt-content/markdown-it-comark.svg?style=flat&colorA=080f12&colorB=1fa669
[license-href]: https://github.com/nuxt-content/markdown-it-comark/blob/main/LICENSE
[jsdocs-src]: https://img.shields.io/badge/jsdocs-reference-080f12?style=flat&colorA=080f12&colorB=1fa669
[jsdocs-href]: https://www.jsdocs.io/package/markdown-it-mdc
[jsdocs-href]: https://www.jsdocs.io/package/markdown-it-comark
19 changes: 10 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
{
"name": "markdown-it-mdc",
"name": "markdown-it-comark",
"type": "module",
"version": "0.2.12",
"packageManager": "pnpm@10.29.2",
"packageManager": "pnpm@10.30.3",
"description": "Markdown Components (MDC) support for markdown-it",
"author": "Anthony Fu <anthonyfu117@hotmail.com>",
"license": "MIT",
"funding": "https://github.com/sponsors/antfu",
"homepage": "https://github.com/nuxt-content/markdown-it-mdc#readme",
"homepage": "https://github.com/nuxt-content/markdown-it-comark#readme",
"repository": {
"type": "git",
"url": "git+https://github.com/nuxt-content/markdown-it-mdc.git"
"url": "git+https://github.com/nuxt-content/markdown-it-comark.git"
},
"bugs": "https://github.com/nuxt-content/markdown-it-mdc/issues",
"bugs": "https://github.com/nuxt-content/markdown-it-comark/issues",
"keywords": [
"markdown",
"markdown-it-plugin"
Expand Down Expand Up @@ -53,20 +53,21 @@
"markdown-it": "^14.0.0"
},
"dependencies": {
"yaml": "^2.8.2"
"js-yaml": "^4.1.1"
},
"devDependencies": {
"@antfu/eslint-config": "^7.4.2",
"@antfu/ni": "^28.2.0",
"@antfu/utils": "^9.3.0",
"@mdit-vue/plugin-component": "^3.0.2",
"@mdit-vue/plugin-frontmatter": "^3.0.2",
"@types/js-yaml": "^4.0.9",
"@types/markdown-it-container": "^4.0.0",
"@types/node": "^25.2.2",
"@types/node": "^25.3.1",
"bumpp": "^10.4.1",
"eslint": "^10.0.0",
"eslint": "^10.0.2",
"lint-staged": "^16.2.7",
"markdown-it": "^14.1.0",
"markdown-it": "^14.1.1",
"markdown-it-container": "^4.0.0",
"markdown-it-task-checkbox": "^1.0.6",
"pnpm": "^10.29.2",
Expand Down
Loading