github.com/neohugo/neohugo@v0.123.8/tpl/tplimpl/embedded/templates/opengraph.html (about) 1 <meta property="og:title" content="{{ .Title }}" /> 2 <meta property="og:description" content="{{ with .Description }}{{ . }}{{ else }}{{if .IsPage}}{{ .Summary }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}{{ end }}" /> 3 <meta property="og:type" content="{{ if .IsPage }}article{{ else }}website{{ end }}" /> 4 <meta property="og:url" content="{{ .Permalink }}" /> 5 6 {{- $images := partial "_funcs/get-page-images" . -}} 7 {{- range first 6 $images -}} 8 <meta property="og:image" content="{{ .Permalink }}" /> 9 {{- end -}} 10 11 {{- if .IsPage }} 12 {{- $iso8601 := "2006-01-02T15:04:05-07:00" -}} 13 <meta property="article:section" content="{{ .Section }}" /> 14 {{ with .PublishDate }}<meta property="article:published_time" {{ .Format $iso8601 | printf "content=%q" | safeHTMLAttr }} />{{ end }} 15 {{ with .Lastmod }}<meta property="article:modified_time" {{ .Format $iso8601 | printf "content=%q" | safeHTMLAttr }} />{{ end }} 16 {{- end -}} 17 18 {{- with .Params.audio }}<meta property="og:audio" content="{{ . }}" />{{ end }} 19 {{- with .Params.locale }}<meta property="og:locale" content="{{ . }}" />{{ end }} 20 {{- with .Site.Params.title }}<meta property="og:site_name" content="{{ . }}" />{{ end }} 21 {{- with .Params.videos }}{{- range . }} 22 <meta property="og:video" content="{{ . | absURL }}" /> 23 {{ end }}{{ end }} 24 25 {{- /* If it is part of a series, link to related articles */}} 26 {{- $permalink := .Permalink }} 27 {{- $siteSeries := .Site.Taxonomies.series }} 28 {{- if $siteSeries }} 29 {{ with .Params.series }}{{- range $name := . }} 30 {{- $series := index $siteSeries ($name | urlize) }} 31 {{- range $page := first 6 $series.Pages }} 32 {{- if ne $page.Permalink $permalink }}<meta property="og:see_also" content="{{ $page.Permalink }}" />{{ end }} 33 {{- end }} 34 {{ end }}{{ end }} 35 {{- end }} 36 37 {{- /* Deprecate site.Social.facebook_admin in favor of site.Params.social.facebook_admin */}} 38 {{- $facebookAdmin := "" }} 39 {{- with site.Params.social }} 40 {{- if reflect.IsMap . }} 41 {{- $facebookAdmin = .facebook_admin }} 42 {{- end }} 43 {{- else }} 44 {{- with site.Social.facebook_admin }} 45 {{- $facebookAdmin = . }} 46 {{- warnf "The social key in site configuration is deprecated. Use params.social.facebook_admin instead." }} 47 {{- end }} 48 {{- end }} 49 50 {{- /* Facebook Page Admin ID for Domain Insights */}} 51 {{ with $facebookAdmin }}<meta property="fb:admins" content="{{ . }}" />{{ end }}