{{/* Source:https://gitlab.com/Roneo/hugo-shortcode-roneo-collection */}} {{ $options := (.Get 0) | default "by-nc-sa" }} {{/* Build the URL according to selected license options */}} {{ $urlOptions := replace $options " " "-" }} {{ $url := printf "%v%v%v" "https://creativecommons.org/licenses/" $urlOptions "/4.0" }} {{ with resources.Get "/creative-commons-icons/cc.jpg" }} {{ end }} {{ if in $options "by"}} {{ with resources.Get "/creative-commons-icons/by.jpg" }} {{ end }} {{ end }} {{ if in $options "nc"}} {{ with resources.Get "/creative-commons-icons/nc.jpg" }} {{ end }} {{ end }} {{ if in $options "sa"}} {{ with resources.Get "/creative-commons-icons/sa.jpg" }} {{ end }} {{ end }}