🔀 Merge pull request #1073 from sudomateo/push-psstlwtvukry

layouts: correctly check for template existence
This commit is contained in:
James Panther
2025-06-22 13:25:13 +10:00
committed by GitHub
3 changed files with 4 additions and 4 deletions
@@ -1,9 +1,9 @@
{{ $jsHome := resources.Get "js/home.js" | resources.Minify | resources.Fingerprint "sha512" }}
<div id="page">
{{ partial "partials/home/page.html" . }}
{{ partial "home/page.html" . }}
</div>
<div id="profile" class="hidden h-full">
{{ partial "partials/home/profile.html" . }}
{{ partial "home/profile.html" . }}
</div>
<script
defer
+1 -1
View File
@@ -21,7 +21,7 @@
>
</div>
{{ $header := print "header/" .Site.Params.header.layout ".html" }}
{{ if templates.Exists $header }}
{{ if templates.Exists ( printf "partials/%s" $header) }}
{{ partial $header . }}
{{ else }}
{{ partial "header/basic.html" . }}
+1 -1
View File
@@ -1,6 +1,6 @@
{{ define "main" }}
{{ $partial := print "home/" .Site.Params.homepage.layout ".html" }}
{{ if templates.Exists $partial }}
{{ if templates.Exists ( printf "partials/%s" $partial) }}
{{ partial $partial . }}
{{ else }}
{{ partial "home/page.html" . }}