Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

@southball/remark-mermaid

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@southball/remark-mermaid

Inline Mermaid conversion for Remark

latest
Source
npmnpm
Version
0.6.0
Version published
Weekly downloads
28
1300%
Maintainers
1
Weekly downloads
 
Created
Source

@southball/remark-mermaid

A remark plugin to convert code blocks with mermaid language set to SVGs.

All generated SVGs are placed in a div with remark-mermaid class set. In addition, the class remark-mermaid-${theme} is also set.

Installation

npm install @southball/remark-mermaid @mermaid-js/mermaid-cli

or, if using yarn,

yarn add @southball/remark-mermaid @mermaid-js/mermaid-cli

Configuration

By default, only the SVG for default theme is generated and inlined.

To set the themes, pass the option like follows:

{
  "themes": ["default", "dark"]
}

The diagram for each theme will then be generated in divs with class remark-mermaid-default and remark-mermaid-dark respectively. They can then be shown or hidden with custom CSS or JS.

FAQs

Package last updated on 24 Dec 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts