@d0rich/nuxt-content-mermaid
v0.3.1
Published
Add mermaid support to @nuxt/content
Downloads
322
Maintainers
Readme
@d0rich/nuxt-content-mermaid
This layer allows you to use mermaid in your nuxt content markdown files.
Setup
- Add
@d0rich/nuxt-content-mermaid
dependency to your project
npm install @d0rich/nuxt-content-mermaid # or yarn add @d0rich/nuxt-content-mermaid
- Add
@d0rich/nuxt-content-mermaid
to thebuildModules
section ofnuxt.config.ts
export default defineNuxtConfig({
extends: [
// Put this layer before one with nuxt content
'@d0rich/nuxt-content-mermaid'
]
})
- Configure layer in
app.config.ts
export default defineAppConfig({
contentMermaid: {
enabled: true,
/**
* @default 'default'
* @description 'default' or '@nuxtjs/color-mode'
*/
color: 'default',
spinnerComponent: 'DAnimationSpinner'
}
})
- Add code block to your markdown file with
mermaid
language specified.