Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/cntrump/hugo-notepadium.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcntrump <cntrump@gmail.com>2021-03-05 08:34:21 +0300
committerGitHub <noreply@github.com>2021-03-05 08:34:21 +0300
commitcedb826c3d61e9c0d0ea71fe41a6c29d23d75d90 (patch)
tree94a4ab2adec668b01a7a1813a46cb8a6a53743e0
parent302bbf151e4158900f0d0b567c1f6190f295960d (diff)
parent8d1dffed2fd30aaad1c99bac39edb3f8675d2d99 (diff)
Merge pull request #111 from JeremyLWright/master
-rw-r--r--layouts/shortcodes/gravizo.html18
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>