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
+4 -4
View File
@@ -5,11 +5,11 @@
{{ if .Params.showHero | default (.Site.Params.article.showHero | default false) }}
{{ $heroStyle := .Params.heroStyle }}
{{ if not $heroStyle }}{{ $heroStyle = .Site.Params.article.heroStyle }}{{ end }}
{{ $heroStyle := print "partials/hero/" $heroStyle ".html" }}
{{ if templates.Exists $heroStyle }}
{{ $heroStyle := print "hero/" $heroStyle ".html" }}
{{ if templates.Exists ( printf "partials/%s" $heroStyle ) }}
{{ partial $heroStyle . }}
{{ else }}
{{ partial "partials/hero/basic.html" . }}
{{ partial "hero/basic.html" . }}
{{ end }}
{{ end }}
@@ -154,7 +154,7 @@
{{ partial "article-pagination.html" . }}
{{ if .Params.showComments | default (.Site.Params.article.showComments | default false) }}
{{ if templates.Exists "partials/comments.html" }}
{{ if templates.Exists "comments.html" }}
<div class="pt-3">
<hr class="border-dotted border-neutral-300 dark:border-neutral-600" />
<div class="pt-3">