Skip to content

intptr-t/honkit-plugin-mermaid-hybrid

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

68 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mermaid plugin for GitBook

NPM Stats npm npm downloads npm bundle size

Plugin for Honkit or GitBook 3 which renders Mermaid diagrams and flow charts detected in the book markdown.

THIS PLUGIN WAS BORN TO USING MERMAID V11.4 AND LATER AT HONKIT/GITBOOKv3

Use mermaid-cli to generate PDFs using Mermaid. Generate a website using Mermaid, we give you the option of using mermaid-cli and Mermaid directly.

Installation

npm install honkit-plugin-mermaid-hybrid

Config

If you want to change the settings of mermaid, please add pluginsConfig in the book.json:

{
  "plugins": ["mermaid-hybrid"],
  "pluginsConfig": {
    "mermaid-hybrid": {
      "plugin": {
        "embed": false
      },
      "mermaid": {
        "theme": "neutral" // default, forest, dar, natural. see https://mermaid-js.github.io/mermaid/#/mermaidAPI?id=theme
      }
    }
  }
}
  • pluginsConfig["mermaid-hybrid"].plugin
    • description: configuration for mermaid-hybrid
  • pluginsConfig["mermaid-hybrid"].plugin.embed
    • description: configuration for mermaid-hybrid
      • If true, mermaid-cli is used during website build.
      • Otherwise, i.e., false or undefined, the Mermaid prepared by this plugin is used directly at website build.
      • Ignored when generating PDFs.
  • pluginsConfig["mermaid-hybrid"].mermaid
    • description: configuration for Mermaid

Linux issue

If you are using Docker, you will need to add a following configurations.

Create a puppeteer-config.json file in the your book directory root:

{
  "args": ["--no-sandbox"]
}

See. Linux sandbox issue

About

A cool diagram plugin for Honkit using mermaid v11

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • JavaScript 90.2%
  • Shell 9.8%