diff options
Diffstat (limited to 'layouts/partials/templates/opengraph.html')
| -rw-r--r-- | layouts/partials/templates/opengraph.html | 34 |
1 files changed, 28 insertions, 6 deletions
diff --git a/layouts/partials/templates/opengraph.html b/layouts/partials/templates/opengraph.html index 627605e..f78f8e8 100644 --- a/layouts/partials/templates/opengraph.html +++ b/layouts/partials/templates/opengraph.html @@ -17,10 +17,32 @@ <meta property="og:image:height" content="{{ $logo.Height }}"> {{- end -}} -{{- /* Facebook Page Admin ID for Domain Insights */}} -{{- with site.Social.facebook_admin }} - <meta property="fb:admins" content="{{ . }}"> -{{- end }} -{{- with site.Social.facebook_id }} +{{- if .IsPage -}} + {{- if not .PublishDate.IsZero }} + <meta property="article:published_time" content="{{ .PublishDate.Format "2006-01-02T15:04:05" }}"> + {{- end -}} + + {{- if not .Lastmod.IsZero }} + <meta property="article:modified_time" content="{{ .Lastmod.Format "2006-01-02T15:04:05" }}"> + {{- end -}} + + {{- if not .ExpiryDate.IsZero }} + <meta property="article:expiration_time" content="{{ .ExpiryDate.Format "2006-01-02T15:04:05" }}"> + {{- end -}} + + {{- with .Params.categories -}}{{- range $v := . }} + <meta property="article:section" content="{{ $v }}"> + {{- end -}}{{- end -}} + + {{- with .Params.tags -}}{{- range $v := . }} + <meta property="article:tag" content="{{ $v }}"> + {{- end -}}{{- end -}} +{{- end -}} + +{{- /* Facebook Page Admin ID for Domain Insights */ -}} +{{- with site.Params.social.facebookId }} <meta property="fb:app_id" content="{{ . }}"> -{{- end }} +{{- end -}} +{{- with site.Params.social.facebookAdminIds -}}{{- range . }} + <meta property="fb:admins" content="{{ . }}"> +{{- end }}{{- end }} |
