Package Exports
- @interrogate/remark-plugin-plantuml
Readme
@interrogate/remark-plugin-plantuml
Process PlantUML diagrams in markdown with Remark.
Quick reference
- Package: @interrogate/remark-plugin-plantuml
- Maintained by: interrogate-io
- Issues: GitHub Issues
Installation
npm install @interrogate/remark-plugin-plantuml
What is this?
A Remark plugin that processes PlantUML code blocks in markdown and attaches diagram data as additional properties. It's designed to work with @interrogate/rehype-plugin-plantuml to generate the final HTML output.
When should I use this?
- When you need to include PlantUML diagrams in your markdown documentation
- When you're processing PlantUML syntax during the markdown transformation phase
- When generating documentation with PlantUML diagrams (e.g., in Docusaurus)
- As part of a complete markdown-to-HTML pipeline using Remark and Rehype
Usage
Basic usage with unified:
import remarkPlantuml from "@interrogate/remark-plugin-plantuml"
import { unified } from "unified"
import remarkParse from "remark-parse"
import remarkRehype from "remark-rehype"
const processor = unified().use(remarkParse).use(remarkPlantuml).use(remarkRehype)
Example: Inline PlantUML
Here's a sequence diagram:
```plantuml
@startuml
Alice -> Bob: Hello
Bob --> Alice: Hi there
@enduml
```
### Example: External PlantUML Files
```markdown

API
remarkPlantuml([options])
Transform PlantUML code blocks in markdown and attach diagram data as properties for consumption by rehype plugins. Options documentation coming soon.
License
MIT © James Lafferty