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
@@ -1,8 +1,8 @@
{{ define "main" }}
{{ $partial := print "partials/home/" .Site.Params.homepage.layout ".html" }}
{{ if templates.Exists $partial }}
{{ $partial := print "home/" .Site.Params.homepage.layout ".html" }}
{{ if templates.Exists ( printf "partials/%s" $partial ) }}
{{ partial $partial . }}
{{ else }}
{{ partial "partials/home/profile.html" . }}
{{ partial "home/profile.html" . }}
{{ end }}
{{ end }}