Omphaloskepsis-2/layouts/shortcodes/page-resource.html
2023-08-22 11:14:33 +01:00

8 lines
231 B
HTML

{{- $src := $.Page.Resources.GetMatch ($.Get 0) -}}
{{- if ( not $src ) -}}
{{- errorf "No Page Resource found for src '%q' (%q)" ( $.Get 0 ) .Page.File.Path -}}
{{- end -}}
{{- with $src -}}
{{- .RelPermalink -}}
{{- end -}}