docs: adjust open graph (#3709)

This commit is contained in:
James Elliott 2022-08-04 11:11:49 +10:00 committed by GitHub
parent 84a2bcecce
commit 20b3b6873f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,6 +1,10 @@
<meta property="og:locale" content="{{ .Site.Params.ogLocale }}">
<meta property="og:type" content="{{ if .IsPage }}article{{ else }}website{{ end }}">
<meta property="og:title" content="{{ .Title }}">
{{ if .IsHome -}}
<meta property="og:title" content="{{ .Site.Params.title }} {{ .Site.Params.titleSeparator }} {{ .Site.Params.titleAddition }}">
{{ else -}}
<meta property="og:title" content="{{ .Title }} {{ .Site.Params.titleSeparator }} {{ humanize .Section }}">
{{ end -}}
<meta property="og:description" content="{{ with .Description }}{{ . }}{{ else }}{{if .IsPage}}{{ .Summary }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}{{ end }}">
{{ if $.Scratch.Get "paginator" -}}
{{ $paginator := .Paginate (where .Site.RegularPages.ByDate.Reverse "Section" "blog" ) -}}