summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Kylie McClain <somasis@exherbo.org> 2015-08-30 10:54:04 -0400
committerAvatar Kylie McClain <somasis@exherbo.org> 2015-08-30 10:54:35 -0400
commit6cc692d43dd48efed6eec9495eb7b81fcb2c8e2e (patch)
tree3474d0254e85196d53de5cfafb539da3789c14d8
parentd82ae058068276103e819d0e8f7aade728e17136 (diff)
downloadwww-6cc692d43dd48efed6eec9495eb7b81fcb2c8e2e.tar.gz
www-6cc692d43dd48efed6eec9495eb7b81fcb2c8e2e.tar.xz
email-gravatar: fallback to github username avatar
Change-Id: Iba2a2dba794a7ead31fb8cb52f5efab825b6837b
-rwxr-xr-xcgit/filters/email-gravatar.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/cgit/filters/email-gravatar.sh b/cgit/filters/email-gravatar.sh
index 432adc6..c2cccad 100755
--- a/cgit/filters/email-gravatar.sh
+++ b/cgit/filters/email-gravatar.sh
@@ -8,7 +8,8 @@
email=${1}
size=${2:-24}
scaledsize=${3:-64}
-fallback="http%3A%2F%2Fexherbo.org%2Fimg%2Fzebrapig-head.png" # always urlencoded
+#fallback="http%3A%2F%2Fexherbo.org%2Fimg%2Fzebrapig-head.png" # always urlencoded
+fallback="https%3A%2F%2Favatars.githubusercontent.com%2F${email%@*}%3Fsize%3D${scaledsize}"
# get rid of [<>], trim and lowercase - https://en.gravatar.com/site/implement/hash/
[[ "${email:0:1}" == '<' ]] && email=${email#<}