Skip to content

mariansimecek/remark-mermaid-nextra

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

remark-mermaid-nextra

Deprecated package

Nextra now supports rendering mermaid diagrams natively, it uses this awesome package @theguild/remark-mermaid. Therefore, this package will no longer be updated.

Remark plugin for rendering mermaid diagrams, should work in nextra

Note that this is an ESM package! Make sure you are using ESM in your Next configuration before attempting to use this package.

Instalation

yarn add remark-mermaid-nextra
npm i remark-mermaid-nextra

Motivation

I could not find any way to use Mermaid diagrams in nextra. Then I found The Guild Component Library. They have solution to make it works. I take their code and use only necessary parts to make plugin works.

Usage

// next.config.mjs

import { remarkMermaid } from 'remark-mermaid-nextra';

const withNextra = nextra({
    mdxOptions: {
        remarkPlugins: [remarkMermaid],
    }
    ...
// page.mdx

```mermaid
graph LR
A[Square Rect] -- Link text --> B((Circle))
A --> C(Round Rect)
B --> D{Rhombus}
C --> D
```

About

Remark Mermaid Nextra plugin that should work.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published