{{ if .Get "default" }} {{ template "_internal/shortcodes/figure.html" . }} {{ else }} {{ $altText := .Get "alt" }} {{ $caption := .Get "caption" }} {{ $href := .Get "href" }} {{ $class := .Get "class" }} {{ with $.Page.Resources.GetMatch (.Get "src") }}
{{ with $href }}{{ end }} {{ $altText }} {{ if $href }}{{ end }} {{ with $caption }}
{{ . | markdownify }}
{{ end }}
{{ else }} {{ errorf `[CONGO] Shortcode "figure" error in "%s": Resource "%s" not found. Check the path is correct or remove the shortcode.` .Page.Path (.Get "src") }} {{ end }} {{ end }}