Skip to content
This repository was archived by the owner on Nov 5, 2023. It is now read-only.

d0rich/nuxt-content-mermaid

Repository files navigation

This project is moved to the monorepo: https://github.com/d0rich/esprit

@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.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors