Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

github.com/netspective-studios/hugo-shortcode-diagram

Package Overview
Dependencies
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/netspective-studios/hugo-shortcode-diagram

Source
Go Modules
Version
v0.0.2
Version published
Created
Source

Hugo shortcode to render Kroki diagrams

The diagram Hugo shortcode renders Kroki supported diagrams from in markdown text. Kroki provides an HTTP API to create diagrams from textual descriptions and supports many diagramming formats.

Usage

Include this in your Hugo config.yaml:

module:
  imports:
    - path: github.com/netspective-studios/hugo-shortcode-diagram
      mounts:
        - source: shortcodes
          target: layouts/shortcodes

If you are using config.toml in Hugo

[[module.imports]]
path                              = "github.com/netspective-studios/hugo-shortcode-diagram"

[[module.imports.mounts]]
source                            = "shortcodes"
target                            = "layouts/shortcodes"

Dot Sample

{{<diagram name="diagram1" type="dot">}}
digraph { Hello -> World }
{{</diagram>}}

PlantUML Sample

{{<diagram name="diagram2" type="plantuml">}}
@startuml
cloud helloWorld as "Hello World (PlantUML)"
@enduml
{{</diagram>}}

FAQs

Package last updated on 21 Jun 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts