From 467e5ac423ce14b97b7c6602366e75b3fb797cd5 Mon Sep 17 00:00:00 2001 From: Matthew Sanabria Date: Sun, 22 Jun 2025 11:34:34 -0400 Subject: [PATCH] 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. --- layouts/_partials/article-link.html | 2 +- layouts/_partials/footer.html | 2 +- layouts/_partials/head.html | 4 ++-- layouts/baseof.html | 2 +- layouts/single.html | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/layouts/_partials/article-link.html b/layouts/_partials/article-link.html index 764038b..d5ef91e 100644 --- a/layouts/_partials/article-link.html +++ b/layouts/_partials/article-link.html @@ -61,7 +61,7 @@ {{ partial "badge.html" (i18n "article.draft" | emojify) }} {{ end }} - {{ if templates.Exists "partials/extend-article-link.html" }} + {{ if templates.Exists "_partials/extend-article-link.html" }} {{ partial "extend-article-link.html" . }} {{ end }} diff --git a/layouts/_partials/footer.html b/layouts/_partials/footer.html index 0a373d0..26f72f6 100644 --- a/layouts/_partials/footer.html +++ b/layouts/_partials/footer.html @@ -134,7 +134,7 @@ {{/* 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" . }} {{ end }} diff --git a/layouts/_partials/head.html b/layouts/_partials/head.html index c480523..7eab697 100644 --- a/layouts/_partials/head.html +++ b/layouts/_partials/head.html @@ -103,7 +103,7 @@ {{ printf `` .Rel .MediaType.Type .Permalink ($.Site.Title | emojify) | safeHTML }} {{ end -}} {{/* Icons */}} - {{ if templates.Exists "partials/favicons.html" }} + {{ if templates.Exists "_partials/favicons.html" }} {{ partialCached "favicons.html" .Site }} {{ else }} @@ -146,7 +146,7 @@ {{/* Analytics */}} {{ partial "analytics.html" . }} {{/* 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" . }} {{ end }} diff --git a/layouts/baseof.html b/layouts/baseof.html index 7290039..9b72776 100644 --- a/layouts/baseof.html +++ b/layouts/baseof.html @@ -21,7 +21,7 @@ > {{ $header := print "header/" .Site.Params.header.layout ".html" }} - {{ if templates.Exists ( printf "partials/%s" $header) }} + {{ if templates.Exists ( printf "_partials/%s" $header) }} {{ partial $header . }} {{ else }} {{ partial "header/basic.html" . }} diff --git a/layouts/single.html b/layouts/single.html index 2f2668c..2a81e52 100644 --- a/layouts/single.html +++ b/layouts/single.html @@ -50,7 +50,7 @@ {{ partial "sharing-links.html" . }} {{ partial "article-pagination.html" . }} {{ if .Params.showComments | default (.Site.Params.article.showComments | default false) }} - {{ if templates.Exists "partials/comments.html" }} + {{ if templates.Exists "_partials/comments.html" }}