{{- $imgSrcSet := or (isset .Params "src") (isset .Params "id") }} {{- if not $imgSrcSet }} {{- errorf "You must set either an id or an src in the figure at content/%s" $.Page.File.Path }} {{- end }} {{- $src := cond (isset .Params "id") (printf "https://www.lucidchart.com/publicSegments/view/%s/image.png" (index .Params "id")) (index .Params "src" | relURL) }} {{- $num := index .Params "number" }}
{{ . }} {{- with (index .Params "caption") }}
{{ with $num }}Figure {{ . }}. {{ end }}{{ . | markdownify }}
{{- end }}