{{/* Open Graph / Twitter Card meta tags for social sharing previews.
Rendered on any page that has a loaded gist (e.g. gist view, revisions) so
that pasting a gist URL into Discord / IRC / Slack shows a rich preview,
like gist.github.com does. */}}
{{ define "seo_meta" }}
{{ if .gist }}
{{ $siteName := "Opengist" }}{{ if $.c.CustomName }}{{ $siteName = $.c.CustomName }}{{ end }}
{{ $description := "" }}{{ if .gist.Description }}{{ $description = .gist.Description }}{{ else }}{{ $description = .gist.Preview }}{{ end }}
{{ $ogDescription := ogText $description 200 }}
{{ $ogTitle := ogText (printf "%s/%s" .gist.User.Username .gist.Title) 100 }}
{{ if shouldGenerateAvatar .gist.User .DisableGravatar }}
{{ else }}
{{ end }}
{{ if shouldGenerateAvatar .gist.User .DisableGravatar }}
{{ else }}
{{ end }}
{{ end }}
{{ end }}