Omphaloskepsis-2/layouts/shortcodes/page-resource.html

9 lines
292 B
HTML
Raw Normal View History

2023-08-22 10:14:33 +00:00
{{- $src := $.Page.Resources.GetMatch ($.Get 0) -}}
{{- if ( not $src ) -}}
2024-04-02 19:36:21 +00:00
{{- 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 -}}
2023-08-22 10:14:33 +00:00
{{- end -}}
{{- with $src -}}
{{- .RelPermalink -}}
2023-07-01 03:16:59 +00:00
{{- end -}}