feat: add partialCached for data/title data/description
This commit is contained in:
parent
cf6502c311
commit
8f0d420d24
@ -2,10 +2,10 @@
|
|||||||
<meta charset='utf-8'>
|
<meta charset='utf-8'>
|
||||||
<meta name='viewport' content='width=device-width, initial-scale=1'>
|
<meta name='viewport' content='width=device-width, initial-scale=1'>
|
||||||
|
|
||||||
{{- $description := partial "data/description" . -}}
|
{{- $description := partialCached "data/description" . .RelPermalink -}}
|
||||||
<meta name='description' content='{{ $description }}'>
|
<meta name='description' content='{{ $description }}'>
|
||||||
|
|
||||||
{{- $title := partial "data/title" . -}}
|
{{- $title := partialCached "data/title" . .RelPermalink -}}
|
||||||
<title>{{ $title }}</title>
|
<title>{{ $title }}</title>
|
||||||
|
|
||||||
<link rel='canonical' href='{{ .Permalink }}'>
|
<link rel='canonical' href='{{ .Permalink }}'>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
{{- $title := partial "data/title" . -}}
|
{{- $title := partialCached "data/title" . .RelPermalink -}}
|
||||||
{{- $description := partial "data/description" . -}}
|
{{- $description := partialCached "data/description" . .RelPermalink -}}
|
||||||
|
|
||||||
<meta property='og:title' content='{{ $title }}'>
|
<meta property='og:title' content='{{ $title }}'>
|
||||||
<meta property='og:description' content='{{ $description }}'>
|
<meta property='og:description' content='{{ $description }}'>
|
||||||
|
@ -2,8 +2,8 @@
|
|||||||
<meta name="twitter:site" content="{{ . }}">
|
<meta name="twitter:site" content="{{ . }}">
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
{{- $title := partial "data/title" . -}}
|
{{- $title := partialCached "data/title" . .RelPermalink -}}
|
||||||
{{- $description := partial "data/description" . -}}
|
{{- $description := partialCached "data/description" . .RelPermalink -}}
|
||||||
|
|
||||||
<meta name="twitter:title" content="{{ $title }}">
|
<meta name="twitter:title" content="{{ $title }}">
|
||||||
<meta name="twitter:description" content="{{ $description }}">
|
<meta name="twitter:description" content="{{ $description }}">
|
||||||
|
Loading…
Reference in New Issue
Block a user