{{/* Based on Source: https://gitlab.com/Roneo/hugo-shortcode-roneo-collection */}} {{- $src := "" -}} {{- $caption := "" -}} {{- $class := "" -}} {{- $preload := "" -}} {{- if .IsNamedParams }} {{- $src = .Get "src" -}} {{- $caption = .Get "caption" -}} {{- $class = .Get "class" -}} {{- $preload = .Get "preload" | default "metadata" -}} {{- else }} {{- $src = .Get 0 -}} {{- $caption = .Get 1 -}} {{- $class = .Get 2 -}} {{- $preload = .Get 3 -}} {{- end }}