diff --git a/layouts/partials/home/profile.html b/layouts/partials/home/profile.html index 5af91364..d139b518 100644 --- a/layouts/partials/home/profile.html +++ b/layouts/partials/home/profile.html @@ -5,7 +5,7 @@ {{- $gravatar := .Site.Params.gravatar -}} {{- with $gravatar -}} {{- $avatar = printf "https://%v/avatar/%v?s=240&d=%v" - (.Host | default "www.gravatar.com") + (path.Clean .Host | default "www.gravatar.com") (md5 $profile.gravatarEmail) (.Style | default "mp") -}} diff --git a/layouts/partials/single/footer.html b/layouts/partials/single/footer.html index 3568abd1..1d62b772 100644 --- a/layouts/partials/single/footer.html +++ b/layouts/partials/single/footer.html @@ -38,7 +38,7 @@ {{- with $params.edit -}} {{- if .Enable -}} - {{- $options := dict "Class" "link-to-edit" "Destination" (printf "%v/%v" .Url $.File.Path) "Title" (T "editThisPage") "Content" (T "editThisPage") "externalIcon" false -}} + {{- $options := dict "Class" "link-to-edit" "Destination" (path.Join .Url $.File.Path) "Title" (T "editThisPage") "Content" (T "editThisPage") "externalIcon" false -}} {{- partial "plugin/link.html" $options -}} {{- end -}} diff --git a/layouts/partials/single/post-author.html b/layouts/partials/single/post-author.html index 58e5eed9..8b0b9c81 100644 --- a/layouts/partials/single/post-author.html +++ b/layouts/partials/single/post-author.html @@ -11,7 +11,11 @@ {{- if (not $avatar | or $params.gravatarForce) | and $author.email -}} {{- $gravatar := .Site.Params.gravatar -}} {{- with $gravatar -}} - {{- $avatar = printf "https://%v/avatar/%v?s=32&d=%v" (.Host | default "www.gravatar.com") (md5 $author.email) (.Style | default "") -}} + {{- $avatar = printf "https://%v/avatar/%v?s=32&d=%v" + (path.Clean .Host | default "www.gravatar.com") + (md5 $author.email) + (.Style | default "") + -}} {{- end -}} {{- end -}}