2024-04-25 10:58:28 -04:00
|
|
|
{{- with or .Title site.Title | plainify }}
|
2024-03-23 19:34:39 -04:00
|
|
|
<meta itemprop="name" content="{{ . }}">
|
|
|
|
{{- end }}
|
|
|
|
|
2024-04-25 10:58:28 -04:00
|
|
|
{{- with or .Description .Summary site.Params.description | plainify | htmlUnescape | chomp }}
|
2024-03-23 19:34:39 -04:00
|
|
|
<meta itemprop="description" content="{{ . }}">
|
|
|
|
{{- end }}
|
|
|
|
|
|
|
|
{{- $ISO8601 := "2006-01-02T15:04:05-07:00" }}
|
|
|
|
{{- with .PublishDate }}
|
|
|
|
<meta itemprop="datePublished" {{ .Format $ISO8601 | printf "content=%q" | safeHTMLAttr }}>
|
|
|
|
{{- end }}
|
|
|
|
|
|
|
|
{{- with .Lastmod }}
|
|
|
|
<meta itemprop="dateModified" {{ .Format $ISO8601 | printf "content=%q" | safeHTMLAttr }}>
|
|
|
|
{{- end }}
|
|
|
|
|
|
|
|
{{- with .WordCount }}
|
|
|
|
<meta itemprop="wordCount" content="{{ . }}">
|
|
|
|
{{- end }}
|
|
|
|
|
|
|
|
{{- $images := partial "_funcs/get-page-images" . }}
|
|
|
|
{{- range first 6 $images }}
|
|
|
|
<meta itemprop="image" content="{{ .Permalink }}">
|
|
|
|
{{- end }}
|
|
|
|
|
|
|
|
{{- /*
|
|
|
|
Keywords precedence:
|
|
|
|
|
|
|
|
1. Use "keywords" term page titles.
|
|
|
|
2. Use "keywords" from front matter if "keywords" is not a taxonomy.
|
|
|
|
3. Use "tags" term page titles.
|
|
|
|
4. Use term page titles from all taxonomies.
|
2018-05-04 11:53:56 -04:00
|
|
|
|
2024-03-23 19:34:39 -04:00
|
|
|
*/}}
|
|
|
|
{{- $keywords := slice }}
|
|
|
|
{{- range .GetTerms "keywords" }}
|
|
|
|
{{- $keywords = $keywords | append .Title }}
|
|
|
|
{{- else }}
|
|
|
|
{{- with .Keywords }}
|
|
|
|
{{- $keywords = . }}
|
|
|
|
{{- else }}
|
|
|
|
{{- range .GetTerms "tags" }}
|
|
|
|
{{- $keywords = $keywords | append .Title }}
|
|
|
|
{{- else }}
|
|
|
|
{{- range $taxonomy, $_ := site.Taxonomies }}
|
|
|
|
{{- range $.GetTerms $taxonomy }}
|
|
|
|
{{- $keywords = $keywords | append .Title }}
|
|
|
|
{{- end }}
|
|
|
|
{{- end }}
|
|
|
|
{{- end }}
|
|
|
|
{{- end }}
|
|
|
|
{{- end }}
|
|
|
|
{{- with $keywords }}
|
|
|
|
<meta itemprop="keywords" content="{{ delimit . `,` }}">
|
2021-02-18 11:51:32 -05:00
|
|
|
{{- end -}}
|