Add a default Description for taxonomy pages
Make use of the detection of the .Kind of page to have a default description for SEO purposes
This commit is contained in:
parent
e78f3c8de9
commit
7b11f7fa77
|
@ -8,7 +8,14 @@
|
|||
<meta property="og:title" content="{{ . }}" />
|
||||
<meta name="twitter:title" content="{{ . | truncate 70 }}" />
|
||||
{{- end }}
|
||||
{{- with .Description | default .Params.subtitle | default .Summary }}
|
||||
{{- if eq .Kind "taxonomyTerm" }}
|
||||
{{- $text := printf "Overview of all pages by %s" .Data.Singular }}
|
||||
{{- $.Scratch.Set "Description" $text }}
|
||||
{{- else if eq .Kind "taxonomy" }}
|
||||
{{- $text := printf "Overview of all pages with the %s #%s" .Data.Singular $.Title }}
|
||||
{{- $.Scratch.Set "Description" $text }}
|
||||
{{- end }}
|
||||
{{- with .Description | default .Params.subtitle | default .Summary | default ($.Scratch.Get "Description") }}
|
||||
<meta name="description" content="{{ . }}">
|
||||
<meta property="og:description" content="{{ . }}">
|
||||
<meta name="twitter:description" content="{{ . | truncate 200 }}">
|
||||
|
|
Loading…
Reference in New Issue
Block a user