Hugo Mermaid Module

Hugo Mermaid Module

Mermaid lets you create diagrams and visualizations using text and code.

Module
github.com/hugomods/mermaid
GitHub Stars Used By Used By Used By Used By

The featured image credited by: https://mermaid.js.org/.

Installation§

1. Import Module§

1[[module.imports]]
2path = "github.com/hugomods/mermaid"
toml

2. Import the JavaScript§

Skip this step if your theme supports HugoPress.

1{{ partial "mermaid/assets/js" . }}
go

Configuration§

The site parameters as following.

ParameterTypeDefaultDescription
js_urlStringLatest version from JS Delivr CDNThe Mermaid script URL.

hugo.yaml

1params:
2  mermaid:
3    js_url: https://cdn.jsdelivr.net/npm/mermaid@latest/dist/mermaid.esm.min.mjs
yaml

hugo.toml

1[params]
2  [params.mermaid]
3    js_url = 'https://cdn.jsdelivr.net/npm/mermaid@latest/dist/mermaid.esm.min.mjs'
toml

hugo.json

1{
2   "params": {
3      "mermaid": {
4         "js_url": "https://cdn.jsdelivr.net/npm/mermaid@latest/dist/mermaid.esm.min.mjs"
5      }
6   }
7}
json

Usage§

Use Mermaid via Code Block§

1```mermaid
2DIAGRAM
3```
markdown

Use Mermaid via Shortcode§

1{{< mermaid >}}
2DIAGRAM
3{{< /mermaid >}}
markdown

Examples§

Flowchart§

Yes

No

Start

Is it?

OK

Rethink

End

Entity Relationship Diagram§

CUSTOMERDELIVERY-ADDRESSORDERINVOICEORDER-ITEMPRODUCT-CATEGORYPRODUCThasplacesliable forreceivescoversincludescontainsordered in
  • All
  • English
  • 简体中文
  • Best match
  • Oldest
  • Newest
  • 2023
  • 2024
  • Hugo Modules Authors
  • OpenModels
  • Razon Yang
  • Bootstrap
  • Comment Engine
  • Content
  • Deployment
  • Docker Images
  • Go
  • HTML
  • Hugo
  • Icons
  • Images
  • Mermaid
  • Module
  • Modules
  • PWA
  • Search
  • SEO
  • Shortcode
  • Shortcodes
  • Toggle
  • 搜索
  • Docker
  • Docs
  • Hugo
  • Module
  • Modules
  • News
  • Shortcode
  • Tutorials
  • 教程
  • 模块
  • Abbr
  • Abbreviations
  • Accordion
  • Alert
  • Alternatives
  • Analytics
  • Animation
  • AOS
  • Articles
  • Asciinema
  • AutoPrefixer
  • BaseURL
  • Bilibili
  • Bootstrap
  • Bootstrap Icons
  • Brightness
  • Button
  • Card
  • Clearfix
  • Code
  • Code Block
  • Code Editor
  • CodePen
  • Col
  • Collapse
  • ColorBalance
  • Colorize
  • Config
  • Container
  • Contrast
  • Crop
  • CSS
  • CSS Variables
  • Debug
  • Deployment
  • Development
  • Diagrams
  • DigitalOcean
  • Digitalocean App Platform
  • Display
  • Docker
  • Docker Hub
  • Docsy
  • EmGitHub
  • Encrypt
  • Environment Variables
  • Favicons
  • Feather Icons
  • Features
  • Fill
  • Fit
  • Flowchart
  • Font Awesome Icons
  • Gamma
  • GaussianBlur
  • Giscus
  • GitHub
  • GitHub Container Registry
  • Google AdSense
  • Google Analytics
  • Grayscale
  • Grid
  • HTML
  • Hue
  • HugoPress
  • I18n
  • Icon Grid
  • Image
  • Internationalization
  • Invert
  • JavaScript
  • JS
  • JSFiddle
  • JSON
  • JSRun
  • KaTeX
  • Lead
  • Link
  • Material Design Icons
  • Math
  • Mergify
  • Microsoft Clarity
  • Modal
  • Music
  • NetEase Cloud Music
  • Offline
  • Open Graph
  • Parameters
  • Pixelate
  • Plausible Analytics
  • PostCSS
  • Proxy
  • Ratio
  • Renovate
  • Requirements
  • Resize
  • Row
  • RTLCSS
  • Saturation
  • Schema
  • Scroll
  • Search
  • Sepia
  • Service Worker
  • Sigmoid
  • Simple Icons
  • Single Page
  • Snackbar
  • Tabler Icons
  • Terminal
  • Toggle
  • TOML
  • Translations
  • Twikoo
  • Twitter Cards
  • UnsharpMask
  • Utterances
  • Video
  • Video.js
  • YAML
  • YouKu
  • CSS 变量
  • i18n
  • 代理服务器
  • 单页
  • 参数
  • 国际化
  • 模态框