Skip to content

Commit 03ee336

Browse files
authored
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 #941 * doc(exampleSite): set paginate to 3 to force pagination
1 parent 21da06e commit 03ee336

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

exampleSite/config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
baseurl: https://example.com
22
languageCode: en-us
33
theme: hugo-theme-stack
4-
paginate: 5
4+
paginate: 3
55
title: Example Site
66
copyright: Example Person
77

layouts/partials/head/head.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<meta name='description' content='{{ $description }}'>
66
{{ with .Params.Keywords }}<meta name="keywords" content="{{ delimit . ", " }}">{{ end }}
77

8-
{{- $title := partialCached "data/title" . .RelPermalink -}}
8+
{{- $title := partial "data/title" . -}}
99
<title>{{ $title }}</title>
1010

1111
<link rel='canonical' href='{{ .Permalink }}'>

0 commit comments

Comments
 (0)