From 03ee3369e1bfe794b5233c4661e66230a5944d69 Mon Sep 17 00:00:00 2001 From: Jimmy Cai Date: Mon, 19 Feb 2024 10:54:02 +0100 Subject: [PATCH] fix: title does not show pagination data (#945) * fix: title does not show pagination data This is caused by partialCached. It turns out that the `.RelPermalink` is the same for all pages generated by the paginator, so they will show the same title as the first page. closes https://github.com/CaiJimmy/hugo-theme-stack/issues/941 * doc(exampleSite): set paginate to 3 to force pagination --- exampleSite/config.yaml | 2 +- layouts/partials/head/head.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/exampleSite/config.yaml b/exampleSite/config.yaml index b723dea..57034a7 100644 --- a/exampleSite/config.yaml +++ b/exampleSite/config.yaml @@ -1,7 +1,7 @@ baseurl: https://example.com languageCode: en-us theme: hugo-theme-stack -paginate: 5 +paginate: 3 title: Example Site copyright: Example Person diff --git a/layouts/partials/head/head.html b/layouts/partials/head/head.html index be63710..c809636 100644 --- a/layouts/partials/head/head.html +++ b/layouts/partials/head/head.html @@ -5,7 +5,7 @@ {{ with .Params.Keywords }}{{ end }} -{{- $title := partialCached "data/title" . .RelPermalink -}} +{{- $title := partial "data/title" . -}} {{ $title }}