From af33efb158899bc0a1db838876b9fc3d0d2f2172 Mon Sep 17 00:00:00 2001 From: Will Faught Date: Thu, 29 Dec 2022 21:23:05 -0800 Subject: [PATCH] Move up figure caption by one position --- README.md | 2 +- layouts/shortcodes/paige/figure.html | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index fa590cbd..4828bf7c 100644 --- a/README.md +++ b/README.md @@ -462,8 +462,8 @@ These are the named parameters with positions, listed in the order of their posi ```go {{< paige/figure src="https://imgs.xkcd.com/comics/sandwich.png" - link="https://xkcd.com/149" caption="My caption" + link="https://xkcd.com/149" title="My title" alt="My alt" >}} ``` diff --git a/layouts/shortcodes/paige/figure.html b/layouts/shortcodes/paige/figure.html index 5c0a5323..f25237ac 100644 --- a/layouts/shortcodes/paige/figure.html +++ b/layouts/shortcodes/paige/figure.html @@ -1,5 +1,5 @@
- {{ $link := .Get 1 | default (.Get `link`) }} + {{ $link := .Get 2 | default (.Get `link`) }} {{ with $link }} {{ end }} @@ -14,7 +14,7 @@ {{ if $link }} {{ end }} - {{ with (.Get 2 | default (.Get `caption`)) }} + {{ with (.Get 1 | default (.Get `caption`)) }}
{{ . }}
{{ end }}