Rewrite templates/partials for Hugo v0.146.0

This commit is contained in:
Ryan Gibson
2025-04-11 09:32:47 -04:00
parent 0d03681d20
commit baaf251bde
14 changed files with 28 additions and 28 deletions
+3 -3
View File
@@ -2,11 +2,11 @@
{{ .Scratch.Set "scope" "list" }}
{{ if .Site.Params.list.showHero | default false }}
{{ $heroStyle := print "partials/hero/" .Site.Params.list.heroStyle ".html" }}
{{ if templates.Exists $heroStyle }}
{{ $heroStyle := print "hero/" .Site.Params.list.heroStyle ".html" }}
{{ if templates.Exists ( printf "partials/%s" $heroStyle ) }}
{{ partial $heroStyle . }}
{{ else }}
{{ partial "partials/hero/basic.html" . }}
{{ partial "hero/basic.html" . }}
{{ end }}
{{- end -}}