You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
721 B
HTML
33 lines
721 B
HTML
{{ $params := . }}
|
|
|
|
{{ $page := $params.page }}
|
|
{{ $url := $params.url }}
|
|
|
|
{{ $result := "" }}
|
|
|
|
{{ with $page.Resources.GetMatch $url }}
|
|
{{ $result = . }}
|
|
{{ else }}
|
|
{{ with $page.Resources.Get $url }}
|
|
{{ $result = . }}
|
|
{{ else }}
|
|
{{ with resources.GetMatch $url }}
|
|
{{ $result = . }}
|
|
{{ else }}
|
|
{{ with resources.Get $url }}
|
|
{{ $result = . }}
|
|
{{ else }}
|
|
{{ with resources.GetRemote $url }}
|
|
{{ $result = . }}
|
|
{{ end }}
|
|
{{ end }}
|
|
{{ end }}
|
|
{{ end }}
|
|
{{ end }}
|
|
|
|
{{ if not $result }}
|
|
{{ errorf "invalid resource: %q" $url }}
|
|
{{ end }}
|
|
|
|
{{ return $result }}
|