Add theme

This commit is contained in:
Daniel Mason 2022-05-08 18:47:31 +12:00
parent e11c3f7f7d
commit 7589ad1190
2580 changed files with 52545 additions and 4 deletions

View file

@ -0,0 +1,16 @@
{{- $resource := 0 -}}
{{- $url := urls.Parse .Path -}}
{{- if not $url.Host | and $url.Path | and (strings.HasSuffix $url.Path "/" | not) -}}
{{- if .Resources -}}
{{- with .Resources.GetMatch $url.Path -}}
{{- $resource = . -}}
{{- end -}}
{{- end -}}
{{- if not $resource -}}
{{- with resources.Get $url.Path -}}
{{- $resource = . -}}
{{- end -}}
{{- end -}}
{{- end -}}
{{- return $resource -}}