From 5f91c6ab3eb86e6ad9aea79fa91bece594fff6cf Mon Sep 17 00:00:00 2001 From: Matthieu Bessat Date: Sun, 1 Sep 2024 12:22:41 +0200 Subject: [PATCH] fix: fig-img short code --- layouts/shortcodes/fig-img.html | 35 ++++++++++++++++++++++++++++----- 1 file changed, 30 insertions(+), 5 deletions(-) diff --git a/layouts/shortcodes/fig-img.html b/layouts/shortcodes/fig-img.html index 805488e..67e5441 100644 --- a/layouts/shortcodes/fig-img.html +++ b/layouts/shortcodes/fig-img.html @@ -1,15 +1,37 @@ -
+{{/** + fig-img + how to use: + + {{< fig-img + src="now.jpg" + options="500x500" + alt="The alt" + caption="The caption" + >}} + + **/}} +{{- if .Get "single" -}} +
+{{ end }} +
{{- if .Get "link" -}} {{- end -}} - {{ $options := .Get "options" }} - {{ $img := (.Page.Resources.GetMatch (.Get "src")).Fit $options }} - {{ with .Get {{- if .Get "link" }}{{ end -}} {{- if or (or (.Get "title") (.Get "caption")) (.Get "attr") -}} @@ -28,4 +50,7 @@ {{- end }}
+{{- if .Get "single" -}} +
+{{ end }}