Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@d0rich/nuxt-content-mermaid

d0rich891.0.0TypeScript support: included

Add mermaid support to @nuxt/content

nuxt, nuxt3, nuxt-layers, front-end

readme

@d0rich/nuxt-content-mermaid

This layer allows you to use mermaid in your nuxt content markdown files.

Setup

  1. Add @d0rich/nuxt-content-mermaid dependency to your project
npm install @d0rich/nuxt-content-mermaid # or yarn add @d0rich/nuxt-content-mermaid
  1. Add @d0rich/nuxt-content-mermaid to the buildModules section of nuxt.config.ts
export default defineNuxtConfig({
  extends: [
    // Put this layer before one with nuxt content
    '@d0rich/nuxt-content-mermaid'
  ]
})
  1. Configure layer in app.config.ts
export default defineAppConfig({
  contentMermaid: {
    enabled: true,
    /**
     * @default 'default'
     * @description 'default' or '@nuxtjs/color-mode'
     */
    color: 'default',
    spinnerComponent: 'DAnimationSpinner'
  }
})
  1. Add code block to your markdown file with mermaid language specified.

changelog

@d0rich/nuxt-content-mermaid

1.0.0

Major Changes

  • 387d1d2: Update hook API to @nuxt/content v3

0.4.1

Patch Changes

  • 6347d2a: Add a class not-prose to ignore tailwindcss prose styles

0.4.0

Minor Changes

  • dec5c1e: Update dependencies

0.3.1

Patch Changes

  • 54f05eb: Fix name typo

0.3.0

Minor Changes

  • 86d70fa: Update dependencies

0.2.0

Minor Changes

  • c3d11c9: Extract components from Nuxt design system to the general Vue package

0.1.5

Patch Changes

  • 068716a: Specify publish config

0.1.4

Patch Changes

  • 9f28fe5: Make packages public

0.1.3

Patch Changes

  • 4b24f9e: Update package meta info