mirror of
https://github.com/jakejarvis/jarv.is.git
synced 2025-04-27 16:30:28 -04:00
39 lines
2.3 KiB
HTML
39 lines
2.3 KiB
HTML
<meta property="og:title" content="{{ .Title }}">
|
|
<meta property="og:site_name" content="{{ .Site.Title }}">
|
|
<meta property="og:type" content="{{ if and .IsPage (eq .Type .Site.Params.mainSection) }}article{{ else }}website{{ end }}">
|
|
<meta property="og:locale" content="en_US">
|
|
<meta property="og:url" content="{{ .Permalink }}">
|
|
<meta property="og:description" content="{{ with .Description }}{{ . }}{{ else }}{{ .Site.Params.description }}{{ end }}">
|
|
|
|
<meta property="og:image" content="{{ .Scratch.Get "socialImage_url" | absURL }}">
|
|
<meta property="og:image:type" content="{{ .Scratch.Get "socialImage_type" }}">
|
|
<meta property="og:image:width" content="{{ .Scratch.Get "socialImage_width" }}">
|
|
<meta property="og:image:height" content="{{ .Scratch.Get "socialImage_height" }}">
|
|
<meta property="og:image:alt" content="{{ .Title }}">
|
|
|
|
{{- if and .IsPage (eq .Type .Site.Params.mainSection) }}
|
|
{{- if not .PublishDate.IsZero }}
|
|
<meta property="article:published_time" content="{{ .PublishDate.Format "2006-01-02T15:04:05-07:00" | safeHTMLAttr }}">
|
|
<meta property="article:modified_time" content="{{ .PublishDate.Format "2006-01-02T15:04:05-07:00" | safeHTMLAttr }}">
|
|
{{- else if not .Date.IsZero }}
|
|
<meta property="article:published_time" content="{{ .Date.Format "2006-01-02T15:04:05-07:00" | safeHTMLAttr }}">
|
|
<meta property="article:modified_time" content="{{ .Date.Format "2006-01-02T15:04:05-07:00" | safeHTMLAttr }}">
|
|
{{- end }}
|
|
{{- with .Site.Author.facebook }}
|
|
<meta property="article:author" content="https://www.facebook.com/{{ . }}">{{ end }}
|
|
{{- with .Params.tags }}{{ range . }}
|
|
<meta property="article:tag" content="{{ . }}">{{ end }}{{ end }}
|
|
{{- end }}
|
|
|
|
{{ with .Site.Author.facebookid }}<meta property="fb:admins" content="{{ . }}">{{ end }}
|
|
{{ with .Site.Params.facebookAppID }}<meta property="fb:app_id" content="{{ . }}">{{ end }}
|
|
|
|
<meta name="twitter:card" content="{{ if .IsPage }}summary_large_image{{ else }}summary{{ end }}">
|
|
<meta name="twitter:domain" content="{{ .Site.Params.domain }}">
|
|
{{- with .Site.Author.twitter }}
|
|
<meta name="twitter:site" content="{{ printf "%s%s" "@" . }}">
|
|
<meta name="twitter:creator" content="{{ printf "%s%s" "@" . }}">
|
|
{{- end }}
|
|
{{ with .Site.Author.twitterid }}<meta name="twitter:creator_id" content="{{ . }}">{{ end }}
|
|
<meta name="twitter:dnt" content="on">
|