2024-04-27 12:38:19 +00:00
|
|
|
{{- /* based on Hugo 0.125.5 schema.html */}}
|
2024-07-21 22:15:38 +00:00
|
|
|
{{- with partial "pageHelper/title.hugo" (dict "page" . "fullyQualified" true "reverse" true) | plainify }}
|
2024-04-24 19:20:11 +00:00
|
|
|
<meta itemprop="name" content="{{ . }}">
|
|
|
|
{{- end }}
|
|
|
|
|
2024-08-27 13:35:48 +00:00
|
|
|
{{- with trim (or .Description .Summary | plainify | htmlUnescape) "\n\r\t " }}
|
2024-04-24 19:20:11 +00:00
|
|
|
<meta itemprop="description" content="{{ . }}">
|
|
|
|
{{- end }}
|
|
|
|
|
|
|
|
{{- $ISO8601 := "2006-01-02T15:04:05-07:00" }}
|
2024-06-30 08:54:48 +00:00
|
|
|
{{- with or .PublishDate .Date }}
|
2024-04-24 19:20:11 +00:00
|
|
|
<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.
|
|
|
|
|
|
|
|
*/}}
|
|
|
|
{{- $keywords := slice }}
|
|
|
|
{{- range .GetTerms "keywords" }}
|
2024-07-21 22:15:38 +00:00
|
|
|
{{- $keywords = $keywords | append (partial "pageHelper/title.hugo" (dict "page" .Page "linkTitle" true) | plainify) }}
|
2024-04-24 19:20:11 +00:00
|
|
|
{{- else }}
|
|
|
|
{{- with .Keywords }}
|
|
|
|
{{- $keywords = . }}
|
|
|
|
{{- else }}
|
|
|
|
{{- range .GetTerms "tags" }}
|
2024-07-21 22:15:38 +00:00
|
|
|
{{- $keywords = $keywords | append (partial "pageHelper/title.hugo" (dict "page" .Page "linkTitle" true) | plainify) }}
|
2024-04-24 19:20:11 +00:00
|
|
|
{{- else }}
|
|
|
|
{{- range $taxonomy, $_ := site.Taxonomies }}
|
|
|
|
{{- range $.GetTerms $taxonomy }}
|
2024-07-21 22:15:38 +00:00
|
|
|
{{- $keywords = $keywords | append (partial "pageHelper/title.hugo" (dict "page" .Page "linkTitle" true) | plainify) }}
|
2024-04-24 19:20:11 +00:00
|
|
|
{{- end }}
|
|
|
|
{{- end }}
|
|
|
|
{{- end }}
|
|
|
|
{{- end }}
|
|
|
|
{{- end }}
|
|
|
|
{{- with $keywords }}
|
|
|
|
<meta itemprop="keywords" content="{{ delimit . `,` }}">
|
|
|
|
{{- end }}
|