layouts: update partials to _partials

Hugo v0.146.0 introduced a
[new template system](https://gohugo.io/templates/new-templatesystem-overview/)
that changed the structure of the `layouts` directory.

Commit https://github.com/jpanther/congo/commit/99d5cf8b28ce82377588310799420721943a3e65
updated this theme to support the new `layouts` directory structure but
missed a few updates to `templates.Exists` calls. This patch fixes those
calls.
This commit is contained in:
Matthew Sanabria
2025-06-22 11:34:34 -04:00
parent 081977fbc4
commit 467e5ac423
5 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -61,7 +61,7 @@
{{ partial "badge.html" (i18n "article.draft" | emojify) }} {{ partial "badge.html" (i18n "article.draft" | emojify) }}
</div> </div>
{{ end }} {{ end }}
{{ if templates.Exists "partials/extend-article-link.html" }} {{ if templates.Exists "_partials/extend-article-link.html" }}
{{ partial "extend-article-link.html" . }} {{ partial "extend-article-link.html" . }}
{{ end }} {{ end }}
</h3> </h3>
+1 -1
View File
@@ -134,7 +134,7 @@
</div> </div>
</div> </div>
{{/* Extend footer - eg. for extra scripts, etc. */}} {{/* Extend footer - eg. for extra scripts, etc. */}}
{{ if templates.Exists "partials/extend-footer.html" }} {{ if templates.Exists "_partials/extend-footer.html" }}
{{ partial "extend-footer.html" . }} {{ partial "extend-footer.html" . }}
{{ end }} {{ end }}
</footer> </footer>
+2 -2
View File
@@ -103,7 +103,7 @@
{{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink ($.Site.Title | emojify) | safeHTML }} {{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink ($.Site.Title | emojify) | safeHTML }}
{{ end -}} {{ end -}}
{{/* Icons */}} {{/* Icons */}}
{{ if templates.Exists "partials/favicons.html" }} {{ if templates.Exists "_partials/favicons.html" }}
{{ partialCached "favicons.html" .Site }} {{ partialCached "favicons.html" .Site }}
{{ else }} {{ else }}
<link rel="apple-touch-icon" sizes="180x180" href="{{ "apple-touch-icon.png" | relURL }}" /> <link rel="apple-touch-icon" sizes="180x180" href="{{ "apple-touch-icon.png" | relURL }}" />
@@ -146,7 +146,7 @@
{{/* Analytics */}} {{/* Analytics */}}
{{ partial "analytics.html" . }} {{ partial "analytics.html" . }}
{{/* Extend head - eg. for custom analytics scripts, etc. */}} {{/* Extend head - eg. for custom analytics scripts, etc. */}}
{{ if templates.Exists "partials/extend-head.html" }} {{ if templates.Exists "_partials/extend-head.html" }}
{{ partial "extend-head.html" . }} {{ partial "extend-head.html" . }}
{{ end }} {{ end }}
</head> </head>
+1 -1
View File
@@ -21,7 +21,7 @@
> >
</div> </div>
{{ $header := print "header/" .Site.Params.header.layout ".html" }} {{ $header := print "header/" .Site.Params.header.layout ".html" }}
{{ if templates.Exists ( printf "partials/%s" $header) }} {{ if templates.Exists ( printf "_partials/%s" $header) }}
{{ partial $header . }} {{ partial $header . }}
{{ else }} {{ else }}
{{ partial "header/basic.html" . }} {{ partial "header/basic.html" . }}
+1 -1
View File
@@ -50,7 +50,7 @@
{{ partial "sharing-links.html" . }} {{ partial "sharing-links.html" . }}
{{ partial "article-pagination.html" . }} {{ partial "article-pagination.html" . }}
{{ if .Params.showComments | default (.Site.Params.article.showComments | default false) }} {{ if .Params.showComments | default (.Site.Params.article.showComments | default false) }}
{{ if templates.Exists "partials/comments.html" }} {{ if templates.Exists "_partials/comments.html" }}
<div class="pt-3"> <div class="pt-3">
<hr class="border-dotted border-neutral-300 dark:border-neutral-600" /> <hr class="border-dotted border-neutral-300 dark:border-neutral-600" />
<div class="pt-3"> <div class="pt-3">