diff options
Diffstat (limited to 'themes/danix-xyz-hacker/layouts/shortcodes')
| -rw-r--r-- | themes/danix-xyz-hacker/layouts/shortcodes/gravatar.html | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/themes/danix-xyz-hacker/layouts/shortcodes/gravatar.html b/themes/danix-xyz-hacker/layouts/shortcodes/gravatar.html index a463086..3a1ebcc 100644 --- a/themes/danix-xyz-hacker/layouts/shortcodes/gravatar.html +++ b/themes/danix-xyz-hacker/layouts/shortcodes/gravatar.html @@ -1,11 +1,11 @@ {{- $email := .Get "email" -}} -{{- $size := .Get "size" | default "256" -}} +{{- $size := .Get "size" | default "256" | int -}} {{- $alt := .Get "alt" | default "User avatar" -}} {{- $class := .Get "class" | default "w-32 h-32 rounded-full" -}} {{- if $email -}} {{- $hash := md5 (strings.TrimSpace (strings.ToLower $email)) -}} - {{- $gravatarURL := printf "https://www.gravatar.com/avatar/%s?s=%s&d=identicon" $hash $size -}} + {{- $gravatarURL := printf "https://www.gravatar.com/avatar/%s?s=%d&d=identicon" $hash $size -}} <img src="{{ $gravatarURL }}" alt="{{ $alt }}" |
