diff --git a/layouts/shortcodes/figure.html b/layouts/shortcodes/figure.html index 9d91d45..61d25d0 100644 --- a/layouts/shortcodes/figure.html +++ b/layouts/shortcodes/figure.html @@ -1,9 +1,4 @@ -{{ $resource := "" }} -{{ if .IsNamedParams }} - {{ $resource = $.Page.Resources.GetMatch (.Get "src") }} -{{ else }} - {{ $resource = $.Page.Resources.GetMatch (.Get 0) }} -{{ end }} +{{ $resource := .Page.Resources.GetMatch (.Get "src") }} {{ $noborder := false }} {{ if .Get "noborder" }} diff --git a/layouts/shortcodes/image.html b/layouts/shortcodes/remote-figure.html similarity index 74% rename from layouts/shortcodes/image.html rename to layouts/shortcodes/remote-figure.html index 480a9b0..4756e3c 100644 --- a/layouts/shortcodes/image.html +++ b/layouts/shortcodes/remote-figure.html @@ -9,5 +9,5 @@ {{ end }}

- {{ partial "remote_figure.html" (dict "src" (.Get "src") "border" $border "hidecaption" $hidecaption "type" "image" "alt" (.Get "alt")) }} + {{ partial "remote_figure.html" (dict "src" (.Get "src") "border" $border "hidecaption" $hidecaption "type" (.Get "type") "alt" (.Get "alt")) }}

diff --git a/layouts/shortcodes/video.html b/layouts/shortcodes/video.html deleted file mode 100644 index 27b6df8..0000000 --- a/layouts/shortcodes/video.html +++ /dev/null @@ -1,13 +0,0 @@ -{{ $border := false }} -{{ if .Get "border" }} - {{ $border = true }} -{{ end }} - -{{ $hidecaption := false }} -{{ if .Get "hidecaption" }} - {{ $hidecaption = true }} -{{ end }} - -

- {{ partial "remote_figure.html" (dict "src" (.Get "src") "border" $border "hidecaption" $hidecaption "type" "video" "alt" (.Get "alt")) }} -