Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ysuzuki19/remark-mermaid
remark plugin for mermaid in markdown
https://github.com/ysuzuki19/remark-mermaid
Last synced: 20 days ago
JSON representation
remark plugin for mermaid in markdown
- Host: GitHub
- URL: https://github.com/ysuzuki19/remark-mermaid
- Owner: ysuzuki19
- License: mit
- Created: 2022-11-24T16:08:18.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2022-11-28T15:21:57.000Z (about 2 years ago)
- Last Synced: 2024-12-17T19:03:09.854Z (27 days ago)
- Language: TypeScript
- Size: 148 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# @ysuzuki19/remark-mermaid
[![npm version](https://badge.fury.io/js/@ysuzuki19%2Fremark-mermaid.svg)](https://badge.fury.io/js/@ysuzuki19%2Fremark-mermaid)
remark plugin for mermaid in markdown.
# install
```bash
$ npm i @ysuzuki19/remark-mermaid mermaid
```## use
```typescript
import remarkMermaid from '@ysuzuki19/remark-mermaid';...
async function main() {
await unified()
.use(remarkMermaid)
.process(...)
}
```For visualize mermaid, you must to run `mermaid.init();` in frontend code.
Because this plugin only transform mermaid code block into `
`.## markdown -> html
````markdown
```mermaid
graph TD;
A-->B;
B-->C;
```
```````html
graph TD; A-->B; B-->C;
```