Omphaloskepsis-2/layouts/shortcodes/page-resource.html
2024-04-02 20:36:21 +01:00

8 lines
292 B
HTML

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