@fonnpo/mdc

Nuxt MDC module
320
Install
npm install @fonnpo/mdc
Latest Version:0.23.2
Vue:3
License:MIT
Last Updated:Sep 30, 2026
Links: GitHub  ·  npm
Maintainer: fonnpo

Nuxt MDC

This primarily addresses the issue where excessive content in the code field during a highlight GET request causes a 431 error.

const long = (code || '').split('\n').length > 260

  const result = await $fetch<HighlightResult | undefined>('/api/_mdc/highlight', {
    method: long ? 'POST' : 'GET',
    [long ? 'body' : 'params']: {
      code,
      lang,
      theme: JSON.stringify(theme),
      options: JSON.stringify(options),
    },
  })
const { code, lang, theme: themeString, options: optionsStr } = event.method === 'POST' ? await readBody(event) : getQuery(event)

Version History

Version Released Vue License
0.23.2 ^3.0 MIT
0.23.1 ^3.0 MIT