github.com/fighterlyt/hugo@v0.47.1/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 {{- with .Params.images }}{{ range first 6 . }} 6 <meta property="og:image" content="{{ . | absURL }}" /> 7 {{ end }}{{ end }} 8 9 {{- if .IsPage }} 10 {{- if not .PublishDate.IsZero }}<meta property="article:published_time" content="{{ .PublishDate.Format "2006-01-02T15:04:05-07:00" | safeHTML }}"/> 11 {{ else if not .Date.IsZero }}<meta property="article:published_time" content="{{ .Date.Format "2006-01-02T15:04:05-07:00" | safeHTML }}"/> 12 {{ end }} 13 {{- if not .Lastmod.IsZero }}<meta property="article:modified_time" content="{{ .Lastmod.Format "2006-01-02T15:04:05-07:00" | safeHTML }}"/>{{ end }} 14 {{- else }} 15 {{- if not .Date.IsZero }} 16 <meta property="og:updated_time" content="{{ .Date.Format "2006-01-02T15:04:05-07:00" | safeHTML }}"/> 17 {{- end }} 18 {{- end }}{{/* .IsPage */}} 19 20 {{- with .Params.audio }}<meta property="og:audio" content="{{ . }}" />{{ end }} 21 {{- with .Params.locale }}<meta property="og:locale" content="{{ . }}" />{{ end }} 22 {{- with .Site.Params.title }}<meta property="og:site_name" content="{{ . }}" />{{ end }} 23 {{- with .Params.videos }} 24 {{- range . }} 25 <meta property="og:video" content="{{ . | absURL }}" /> 26 {{ end }}{{ end }} 27 28 {{- /* If it is part of a series, link to related articles */}} 29 {{- $permalink := .Permalink }} 30 {{- $siteSeries := .Site.Taxonomies.series }}{{ with .Params.series }} 31 {{- range $name := . }} 32 {{- $series := index $siteSeries $name }} 33 {{- range $page := first 6 $series.Pages }} 34 {{- if ne $page.Permalink $permalink }}<meta property="og:see_also" content="{{ $page.Permalink }}" />{{ end }} 35 {{- end }} 36 {{ end }}{{ end }} 37 38 {{- if .IsPage }} 39 {{- range .Site.Authors }}{{ with .Social.facebook }} 40 <meta property="article:author" content="https://www.facebook.com/{{ . }}" />{{ end }}{{ with .Site.Social.facebook }} 41 <meta property="article:publisher" content="https://www.facebook.com/{{ . }}" />{{ end }} 42 <meta property="article:section" content="{{ .Section }}" /> 43 {{- with .Params.tags }}{{ range first 6 . }} 44 <meta property="article:tag" content="{{ . }}" />{{ end }}{{ end }} 45 {{- end }}{{ end }} 46 47 {{- /* Facebook Page Admin ID for Domain Insights */}} 48 {{- with .Site.Social.facebook_admin }}<meta property="fb:admins" content="{{ . }}" />{{ end }}