2024-04-01 11:07:02 -04:00
< meta property = "og:title" content = "{{ .Title }}" >
< meta property = "og:description" content = "{{ with .Description }}{{ . }}{{ else }}{{if .IsPage}}{{ .Summary }}{{ else }}{{ with site.Params.description }}{{ . }}{{ end }}{{ end }}{{ end }}" >
< meta property = "og:type" content = "{{ if .IsPage }}article{{ else }}website{{ end }}" >
< meta property = "og:url" content = "{{ .Permalink }}" >
2020-10-11 11:34:17 -04:00
{{- if .Params.cover.image -}}
{{- if (ne .Params.cover.relative true) }}
2024-04-01 11:07:02 -04:00
< meta property = "og:image" content = "{{ .Params.cover.image | absURL }}" >
2020-10-11 11:34:17 -04:00
{{- else}}
2024-04-01 11:07:02 -04:00
< meta property = "og:image" content = "{{ (path.Join .RelPermalink .Params.cover.image ) | absURL }}" >
2020-10-11 11:34:17 -04:00
{{- end}}
2020-10-12 07:56:45 -04:00
{{- else }}
2021-03-23 06:14:46 -04:00
2023-12-04 06:05:41 -05:00
{{- $images := partial "partials/templates/_funcs/get-page-images" . -}}
{{- range first 6 $images }}
2024-04-01 11:07:02 -04:00
< meta property = "og:image" content = "{{ .Permalink }}" >
2023-12-04 06:05:41 -05:00
{{ end -}}
2020-10-12 07:56:45 -04:00
{{- end }}
2020-10-11 07:01:13 -04:00
{{- if .IsPage }}
2021-03-23 06:14:46 -04:00
{{- $iso8601 := "2006-01-02T15:04:05-07:00" -}}
2024-04-01 11:07:02 -04:00
< meta property = "article:section" content = "{{ .Section }}" >
{{ with .PublishDate }}< meta property = "article:published_time" { { . Format $ iso8601 | printf " content = %q" | safeHTMLAttr } } > {{ end }}
{{ with .Lastmod }}< meta property = "article:modified_time" { { . Format $ iso8601 | printf " content = %q" | safeHTMLAttr } } > {{ end }}
2021-03-23 06:14:46 -04:00
{{- end -}}
2020-10-11 07:01:13 -04:00
2024-04-01 11:07:02 -04:00
{{- with .Params.audio }}< meta property = "og:audio" content = "{{ . }}" > {{ end }}
{{- with .Params.locale }}< meta property = "og:locale" content = "{{ . }}" > {{ end }}
{{- with site.Params.title }}< meta property = "og:site_name" content = "{{ . }}" > {{ end }}
2021-03-23 06:14:46 -04:00
{{- with .Params.videos }}{{- range . }}
2024-04-01 11:07:02 -04:00
< meta property = "og:video" content = "{{ . | absURL }}" >
2020-10-11 07:01:13 -04:00
{{ end }}{{ end }}
{{- /* If it is part of a series, link to related articles */}}
{{- $permalink := .Permalink }}
2022-03-27 09:14:06 -04:00
{{- $siteSeries := site.Taxonomies.series }}
2023-11-04 05:31:23 -04:00
{{- if $siteSeries }}
2021-03-23 06:14:46 -04:00
{{ with .Params.series }}{{- range $name := . }}
2020-12-16 06:13:30 -05:00
{{- $series := index $siteSeries ($name | urlize) }}
2020-10-11 07:01:13 -04:00
{{- range $page := first 6 $series.Pages }}
2024-04-01 11:07:02 -04:00
{{- if ne $page.Permalink $permalink }}< meta property = "og:see_also" content = "{{ $page.Permalink }}" > {{ end }}
2020-10-11 07:01:13 -04:00
{{- end }}
{{ end }}{{ end }}
2023-11-04 05:31:23 -04:00
{{- end }}
2020-10-11 07:01:13 -04:00
2024-03-12 14:16:05 -04:00
{{- /* Facebook Page Admin ID for Domain Insights */}}
2023-11-04 05:38:01 -04:00
{{- with site.Params.social }}
{{- if reflect.IsMap . }}
2024-03-12 14:16:05 -04:00
{{- with .facebook_admin }}
2024-04-01 11:07:02 -04:00
< meta property = "fb:admins" content = "{{ . }}" >
2024-03-12 14:16:05 -04:00
{{- end }}
2023-11-04 05:35:42 -04:00
{{- end }}
{{- end }}