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
This commit is contained in:
parent
21da06e448
commit
03ee3369e1
@ -1,7 +1,7 @@
|
|||||||
baseurl: https://example.com
|
baseurl: https://example.com
|
||||||
languageCode: en-us
|
languageCode: en-us
|
||||||
theme: hugo-theme-stack
|
theme: hugo-theme-stack
|
||||||
paginate: 5
|
paginate: 3
|
||||||
title: Example Site
|
title: Example Site
|
||||||
copyright: Example Person
|
copyright: Example Person
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<meta name='description' content='{{ $description }}'>
|
<meta name='description' content='{{ $description }}'>
|
||||||
{{ with .Params.Keywords }}<meta name="keywords" content="{{ delimit . ", " }}">{{ end }}
|
{{ with .Params.Keywords }}<meta name="keywords" content="{{ delimit . ", " }}">{{ end }}
|
||||||
|
|
||||||
{{- $title := partialCached "data/title" . .RelPermalink -}}
|
{{- $title := partial "data/title" . -}}
|
||||||
<title>{{ $title }}</title>
|
<title>{{ $title }}</title>
|
||||||
|
|
||||||
<link rel='canonical' href='{{ .Permalink }}'>
|
<link rel='canonical' href='{{ .Permalink }}'>
|
||||||
|
Loading…
Reference in New Issue
Block a user