{{/* USAGE: {{< sidebyside "gifv" "/path/to/src" "file1=caption" "file2=caption" >}} */}} {{ $type := index .Params 0 }} {{ $path := index .Params 1 }} {{ $figures := after 2 .Params }}
{{ $.Scratch.Set "size" (div 12 (len $figures)) }} {{ range $figure := $figures }} {{ $.Scratch.Set "src" (index (split $figure "=") 0) }} {{ $.Scratch.Set "title" (index (split $figure "=") 1) }}
{{ if eq $type "gifv" }}
{{ else if eq $type "image" }} {{ $.Scratch.Get {{ end }}

{{ $.Scratch.Get "title" }}

{{ end }}