diff options
-rw-r--r-- | layouts/partials/header.html | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/layouts/partials/header.html b/layouts/partials/header.html index 442fffe..3fb6ff4 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -52,6 +52,13 @@ {{$imageLink = .Site.Params.authorImgPath -}} {{ end -}} + <!-- This block handles relative paths to the preview image --> + {{- if .File.Dir -}} + {{ if not (hasPrefix $imageLink "/") -}} + {{ $imageLink = path.Join .File.Dir $imageLink -}} + {{ end -}} + {{ end -}} + {{ "<!-- OpenGraph/Twitter Specific Stuff-->" | safeHTML }} <meta name="twitter:card" content="summary"> <meta property=”og:type” content=”blog”> @@ -71,4 +78,4 @@ {{ partial "custom_header.html" . }} {{ template "_internal/google_analytics.html" . }} -</head> +</head>
\ No newline at end of file |