skills/comark.dev/migrate-mdc-to-comark

migrate-mdc-to-comark

Installation
SKILL.md

Migrate from @nuxtjs/mdc to Comark

@nuxtjs/mdc was Nuxt-only. Comark is its successor: the markdown syntax is fully compatible, your .md files need no changes. What changes is the JavaScript API.

The migration has two parts: Core Package (programmatic API) and Nuxt Module (components, slots, config).

Quick Overview

  • Package: @nuxtjs/mdccomark (core only) or @comark/nuxt (Nuxt module)
  • Parse: parseMarkdown()parseMarkdown() · factory: createMarkdownParser() (sync, no await)
  • Render: stringifyMarkdown()renderMarkdown() from comark/render
  • AST: object tree → compact tuples ['tag', props, ...children]
  • Result: result.body / result.datadocument.nodes / document.frontmatter
  • Renderer: <MDCRenderer :body :data><MarkdownDocument :value>
  • All-in-one: <MDC :value><Markdown :value>
  • Slots: <MDCSlot /> → native <slot />
  • Plugins: global nuxt.config → per-component defineMarkdownComponent({ plugins })
  • Markdown files: no changes needed
Installs
63
First Seen
Apr 21, 2026
migrate-mdc-to-comark from comark.dev