mirror of
https://github.com/CaiJimmy/hugo-theme-stack.git
synced 2024-11-23 10:21:46 +01:00
feat: add partialCached for data/title data/description
This commit is contained in:
parent
cf6502c311
commit
8f0d420d24
3 changed files with 6 additions and 6 deletions
|
@ -2,10 +2,10 @@
|
|||
<meta charset='utf-8'>
|
||||
<meta name='viewport' content='width=device-width, initial-scale=1'>
|
||||
|
||||
{{- $description := partial "data/description" . -}}
|
||||
{{- $description := partialCached "data/description" . .RelPermalink -}}
|
||||
<meta name='description' content='{{ $description }}'>
|
||||
|
||||
{{- $title := partial "data/title" . -}}
|
||||
{{- $title := partialCached "data/title" . .RelPermalink -}}
|
||||
<title>{{ $title }}</title>
|
||||
|
||||
<link rel='canonical' href='{{ .Permalink }}'>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{{- $title := partial "data/title" . -}}
|
||||
{{- $description := partial "data/description" . -}}
|
||||
{{- $title := partialCached "data/title" . .RelPermalink -}}
|
||||
{{- $description := partialCached "data/description" . .RelPermalink -}}
|
||||
|
||||
<meta property='og:title' content='{{ $title }}'>
|
||||
<meta property='og:description' content='{{ $description }}'>
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
<meta name="twitter:site" content="{{ . }}">
|
||||
{{- end -}}
|
||||
|
||||
{{- $title := partial "data/title" . -}}
|
||||
{{- $description := partial "data/description" . -}}
|
||||
{{- $title := partialCached "data/title" . .RelPermalink -}}
|
||||
{{- $description := partialCached "data/description" . .RelPermalink -}}
|
||||
|
||||
<meta name="twitter:title" content="{{ $title }}">
|
||||
<meta name="twitter:description" content="{{ $description }}">
|
||||
|
|
Loading…
Reference in a new issue