From 16726d13b5f879051eb1a2054f64a7fc15c70077 Mon Sep 17 00:00:00 2001 From: Nicolas MASSE Date: Tue, 22 Dec 2020 17:20:21 +0100 Subject: [PATCH] new shortcodes --- layouts/shortcodes/attachedFigure.html | 11 +++++++++++ layouts/shortcodes/figure.html | 10 ++++++++++ 2 files changed, 21 insertions(+) create mode 100644 layouts/shortcodes/attachedFigure.html create mode 100644 layouts/shortcodes/figure.html diff --git a/layouts/shortcodes/attachedFigure.html b/layouts/shortcodes/attachedFigure.html new file mode 100644 index 0000000..a02f8fa --- /dev/null +++ b/layouts/shortcodes/attachedFigure.html @@ -0,0 +1,11 @@ + +{{ $filename := .Get "src" }} +{{ $image := .Page.Resources.GetMatch (printf "%s" $filename) }} +
+ + {{ with .Get "title" }} +
+ {{ . }} +
+ {{ end }} +
\ No newline at end of file diff --git a/layouts/shortcodes/figure.html b/layouts/shortcodes/figure.html new file mode 100644 index 0000000..8c2ea6d --- /dev/null +++ b/layouts/shortcodes/figure.html @@ -0,0 +1,10 @@ + +{{ $url := .Get "src" }} +
+ + {{ with .Get "title" }} +
+ {{ . }} +
+ {{ end }} +
\ No newline at end of file