From 5d335647d0e56cbd426de4b3af68e74a9ccb1d2b Mon Sep 17 00:00:00 2001 From: BBaoVanC Date: Thu, 7 Aug 2025 02:17:24 -0500 Subject: [PATCH] Remove description-or-summary partial and just use .Summary I think this may have changed in Hugo's history, but now description and summary are considered different things. The description is what goes in metadata (and what search engines see), while the summary is the blurb about the article that should be displayed when rendering a summary (what I should've been using always here). --- layouts/_partials/description-or-summary.html | 7 ------- layouts/authors/summary.html | 8 +++++--- layouts/section.summary.html | 8 +++++--- layouts/series/summary.html | 8 +++++--- layouts/summary.html | 8 +++++--- layouts/taxonomy.html | 2 +- 6 files changed, 21 insertions(+), 20 deletions(-) delete mode 100644 layouts/_partials/description-or-summary.html diff --git a/layouts/_partials/description-or-summary.html b/layouts/_partials/description-or-summary.html deleted file mode 100644 index be5f6ea..0000000 --- a/layouts/_partials/description-or-summary.html +++ /dev/null @@ -1,7 +0,0 @@ -{{ with .Description }} -

{{ . | markdownify }}

-{{ else }} - {{ with .Summary }} - {{ . }} - {{ end }} -{{ end }} diff --git a/layouts/authors/summary.html b/layouts/authors/summary.html index f28c98d..c828385 100644 --- a/layouts/authors/summary.html +++ b/layouts/authors/summary.html @@ -5,9 +5,11 @@ {{ partial "page-metadata/author.html" . }} -
- {{ partial "description-or-summary.html" . }} -
+{{ with .Summary }} +
+ {{ . }} +
+{{ end }}
{{ i18n "read_more" }} → diff --git a/layouts/section.summary.html b/layouts/section.summary.html index 6abe069..1e12b72 100644 --- a/layouts/section.summary.html +++ b/layouts/section.summary.html @@ -5,8 +5,10 @@ {{ .Title | markdownify }} -
- {{ partial "description-or-summary.html" . }} -
+ {{ with .Summary }} +
+ {{ . }} +
+ {{ end }}
diff --git a/layouts/series/summary.html b/layouts/series/summary.html index 61edc1b..11080e5 100644 --- a/layouts/series/summary.html +++ b/layouts/series/summary.html @@ -6,9 +6,11 @@ {{ partial "page-metadata/series.html" . }} -
- {{ partial "description-or-summary.html" . }} -
+{{ with .Summary }} +
+ {{ . }} +
+{{ end }}
{{ range .Data.Pages.Reverse }} diff --git a/layouts/summary.html b/layouts/summary.html index b690259..5955d66 100644 --- a/layouts/summary.html +++ b/layouts/summary.html @@ -8,9 +8,11 @@ {{ partial "feature-figure.html" . }} -
- {{ partial "description-or-summary.html" . }} -
+{{ with .Summary }} +
+ {{ . }} +
+{{ end }}
{{ i18n "read_more" }} → diff --git a/layouts/taxonomy.html b/layouts/taxonomy.html index b95c4d8..0ce1bd5 100644 --- a/layouts/taxonomy.html +++ b/layouts/taxonomy.html @@ -28,7 +28,7 @@ {{ partial "page-metadata/taxonomy.html" . }}
- {{ partial "description-or-summary.html" . }} + {{ .Summary }} {{ end }} {{ end }}