{{- /* @param {string} (positional parameter 0) Resource UUID. @param {string} (positional parameter 1) File name. @param {string} (positional parameter 2) Syntax highlighting. If not specified, the syntax is determined by the file extension. @returns {template.HTML} @examples {{< resource "57a61c3d-b2ef-51c9-9fe0-cced0cf0e53c" "bash.openssl.ca.sh" >}} {{< resource "57a61c3d-b2ef-51c9-9fe0-cced0cf0e53c" "bash.openssl.ca.sh" "sh" >}} */ -}} {{- if (and (.Get 0) (.Get 1)) -}} {{ $uuid := (.Get 0) }} {{ $file := (.Get 1) }} {{ $lang := (.Get 2) }} {{ range (site.Pages.ByParam "uuid") }} {{ if (eq (.Param "uuid") $uuid) }} {{ $resURL := (.RelPermalink) }} {{ with (.Resources.Match ($file)) }} {{ range . }} {{ $cp := ((printf "clipboard-%s-%s" ($.Name) (delimit (shuffle (seq 11 99)) "")) | md5) }}
{{ end }} {{ end }} {{ end }} {{ end }} {{- else -}} {{ (partial "alerts/no_params" .) }} {{- end -}}