diff --git a/layouts/_default/search.json b/layouts/_default/search.json index 19d17f2..04d132d 100644 --- a/layouts/_default/search.json +++ b/layouts/_default/search.json @@ -9,7 +9,7 @@ {{ if or (hasPrefix .Params.Image "/") (hasPrefix .Params.Image "http://") (hasPrefix .Params.Image "https://") }} {{ $image = .Params.Image }} {{ else }} - {{ $image = path.Join "/" (path.Join .File.Dir .Params.Image) }} + {{ $image = print .Permalink "/" .Params.Image }} {{ end }} {{ end }} {{ $mscratch.Add "articles" (dict diff --git a/layouts/index.json b/layouts/index.json index 5ff5066..aff74af 100644 --- a/layouts/index.json +++ b/layouts/index.json @@ -16,7 +16,7 @@ {{ if or (hasPrefix .Params.Image "/") (hasPrefix .Params.Image "http://") (hasPrefix .Params.Image "https://") }} {{ $image = .Params.Image }} {{ else }} - {{ $image = path.Join (path.Join .File.Dir .Params.Image) }} + {{ $image = print .Permalink "/" .Params.Image }} {{ end }} {{ end }} {{ $mscratch.Add "articles" (dict diff --git a/layouts/partials/article_card.html b/layouts/partials/article_card.html index 9e899d7..6f428f4 100644 --- a/layouts/partials/article_card.html +++ b/layouts/partials/article_card.html @@ -20,7 +20,7 @@ {{ if or (hasPrefix .Params.Image "/") (hasPrefix .Params.Image "http://") (hasPrefix .Params.Image "https://") }} {{ .Params.Alt }} {{ else }} - {{ .Params.Alt }} + {{ .Params.Alt }} {{ end }} {{ end }} diff --git a/layouts/partials/featured_articles.html b/layouts/partials/featured_articles.html index 4ff6a8f..48546a1 100644 --- a/layouts/partials/featured_articles.html +++ b/layouts/partials/featured_articles.html @@ -5,7 +5,7 @@ {{ if or (hasPrefix .Params.Image "/") (hasPrefix .Params.Image "http://") (hasPrefix .Params.Image "https://") }} {{ $image = .Params.Image }} {{ else }} - {{ $image = path.Join "/" (path.Join .File.Dir .Params.Image) }} + {{ $image = print .Permalink "/" .Params.Image }} {{ end }} {{ end }} diff --git a/layouts/partials/head_meta_opengraph.html b/layouts/partials/head_meta_opengraph.html index 98e6ad1..9bffc55 100644 --- a/layouts/partials/head_meta_opengraph.html +++ b/layouts/partials/head_meta_opengraph.html @@ -20,7 +20,7 @@ {{ if or (hasPrefix .Params.Image "/") (hasPrefix .Params.Image "http://") (hasPrefix .Params.Image "https://") }} {{ $image = .Params.Image }} {{ else }} - {{ $image = path.Join (path.Join .File.Dir .Params.Image) }} + {{ $image = print .Permalink "/" .Params.Image }} {{ end }} {{ end }} {{ else }} - {{ .Params.Alt }} + {{ .Params.Alt }} {{ end }} {{ if .Params.ImageCaption }}