header: Fix OG metadata for image path when URL contains sub-dirs

This commit is contained in:
George Cushen committed 2018-05-08 22:26:18 +01:00
1 parent 737470c027
commit 6988b4074b
1 file changed
+1 -1
+1 -1
View File
@@ -115,7 +115,7 @@
<meta property="og:url" content="{{ .Permalink }}">
<meta property="og:title" content="{{ if not .IsHome }}{{ .Title }} | {{ end }}{{ .Site.Title }}">
<meta property="og:description" content="{{ $scr.Get "description" }}">
{{- with .Params.header.image }}<meta property="og:image" content="{{ printf "/img/%s" . | absURL }}">{{end}}
{{- with .Params.header.image }}<meta property="og:image" content="{{ printf "img/%s" . | absURL }}">{{end}}
<meta property="og:locale" content="{{ .Site.LanguageCode | default "en-us" }}">
{{ if .IsPage }}
{{ if not .PublishDate.IsZero }}<meta property="article:published_time" content="{{ .PublishDate.Format "2006-01-02T15:04:05-07:00" | safeHTML }}">