diff options
author | cntrump <cntrump@gmail.com> | 2021-03-05 08:34:21 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-05 08:34:21 +0300 |
commit | cedb826c3d61e9c0d0ea71fe41a6c29d23d75d90 (patch) | |
tree | 94a4ab2adec668b01a7a1813a46cb8a6a53743e0 | |
parent | 302bbf151e4158900f0d0b567c1f6190f295960d (diff) | |
parent | 8d1dffed2fd30aaad1c99bac39edb3f8675d2d99 (diff) |
Merge pull request #111 from JeremyLWright/master
-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> |