diff options
-rw-r--r-- | layouts/shortcodes/gravizo.html | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/layouts/shortcodes/gravizo.html b/layouts/shortcodes/gravizo.html new file mode 100644 index 0000000..a6c9fe7 --- /dev/null +++ b/layouts/shortcodes/gravizo.html @@ -0,0 +1,18 @@ +{{ $title := "Diagram" }} +{{ if .IsNamedParams }} + {{ with .Get "title" }} + {{ $title = . }} + {{ end }} +{{ else }} + {{ with .Get 0 }} + {{ $title = . }} + {{ end }} +{{ end }} + +<figure> + <img + src='https://g.gravizo.com/svg?{{ .Inner }}' + alt='{{ $title }}' + /> + <figcaption>{{ $title }}</figcaption> +</figure> |