Added og image tag

This commit is contained in:
Dan Brown 2017-07-28 14:37:33 +01:00
commit 50cd408578
Signed by: danb
GPG key ID: 46D9F943C24A2EF9

View file

@ -11,9 +11,17 @@
<meta property="og:site_name" content="{{ .Site.Title }}" />
<meta property="og:url" content="{{ .Permalink }}" />
{{ if .IsPage }}
<meta property="og:type" content="article" />
{{ $baseURL := .Site.BaseURL }}
{{ if .IsPage }}
{{ with .Params.image }}
<!-- Twitter summary card with large image must be at least 280x150px -->
<meta name="twitter:card" content="summary_large_image"/>
<meta name="og:image" content="{{ $baseURL }}{{ . }}"/>
{{ end }}
<meta property="og:type" content="article" />
<meta property="og:article:published_time" content="{{ .Date.Format "2006-01-02T15:04:05Z07:00" | safeHTML }}" />
{{ range .Params.tags }}