Browse Source

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

George Cushen 7 years ago
parent
commit
6988b4074b
1 changed files with 1 additions and 1 deletions
  1. 1 1
      layouts/partials/header.html

+ 1 - 1
layouts/partials/header.html

@@ -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 }}">