Overhaul figures
This commit is contained in:
27
layouts/partials/paige/func-resource.html
Normal file
27
layouts/partials/paige/func-resource.html
Normal file
@@ -0,0 +1,27 @@
|
||||
{{ $page := .page }}
|
||||
{{ $url := .url }}
|
||||
|
||||
{{ $resource := "" }}
|
||||
{{ with $page.Resources.GetMatch $url }}
|
||||
{{ $resource = . }}
|
||||
{{ else }}
|
||||
{{ with $page.Resources.Get (relLangURL $url) }}
|
||||
{{ $resource = . }}
|
||||
{{ else }}
|
||||
{{ with resources.GetMatch $url }}
|
||||
{{ $resource = . }}
|
||||
{{ else }}
|
||||
{{ with resources.Get (relLangURL $url) }}
|
||||
{{ $resource = . }}
|
||||
{{ else }}
|
||||
{{ with resources.GetRemote $url }}
|
||||
{{ $resource = . }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ if not $resource }}
|
||||
{{ errorf "invalid resource: %q" $url }}
|
||||
{{ end }}
|
||||
{{ return $resource }}
|
Reference in New Issue
Block a user