1.0.2 • Published 6 months ago

honkit-plugin-mermaid-hybrid v1.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

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

1.0.2

6 months ago

1.0.1

7 months ago

1.0.0

7 months ago