{{- with .Params.cover -}} {{- $type := ( printf "%T" . ) -}} {{- $isMap := ( not ( eq $type "string" ) ) -}} {{- $image := "" -}} {{- if $isMap -}} {{- $image = .image -}} {{- else -}} {{- $image = . -}} {{- end -}} {{- $image = ( replaceRE "^\\./" $.RelPermalink $image ) -}} {{- end -}} {{- with .Params.images -}} {{- range first 5 . -}} {{- end -}} {{- end -}} {{- if not ( or .Params.images .Params.cover ) -}} {{- range $authorID := .Params.authors -}} {{- $author := ( index $.Site.Data.authors $authorID ) -}} {{- with $author -}} {{- if or .social.email ( and .email.username .email.host ) -}} {{- end -}} {{- end -}} {{- end -}} {{- end -}} {{- with .Params.audios -}} {{- range first 5 . -}} {{- end -}} {{- end -}} {{- with .Params.videos -}} {{- range first 5 . -}} {{- end -}} {{- end -}} {{- if .IsPage -}} {{- range $authorID := .Params.authors -}} {{- $author := ( index $.Site.Data.authors $authorID ) -}} {{- with $author.social.facebook -}} {{- end -}} {{- end -}} {{- with .Site.Params.opengraph.facebook.pageid -}} {{- end -}} {{- range .Params.tags -}} {{- end -}} {{- end -}} {{- $dateFormat := "2006-01-02T15:04:05Z07:00" -}} {{- if .IsPage -}} {{- if not .PublishDate.IsZero -}} {{- else if not .Date.IsZero -}} {{- end -}} {{- if not .Lastmod.IsZero -}} {{- end -}} {{- if not .ExpiryDate.IsZero -}} {{- end -}} {{- else -}} {{- if not .Site.LastChange.IsZero -}} {{- end -}} {{- end -}} {{- with .Site.Params.opengraph.facebook -}} {{- with .appid -}} {{- end -}} {{- range .admins -}} {{- end -}} {{- end -}} {{- partial "head/opengraph/twitter" . -}}