diff --git a/_includes/sidebar.html b/_includes/sidebar.html index fd32f06..4d7f5dd 100644 --- a/_includes/sidebar.html +++ b/_includes/sidebar.html @@ -10,17 +10,16 @@
- - {% assign avatar_url = site.avatar %} - - {% unless avatar_url contains '://' %} - {% if site.img_cdn %} - {% assign avatar_url = avatar_url | prepend: site.img_cdn %} - {% else %} - {% assign avatar_url = avatar_url | relative_url %} - {% endif %} - {% endunless %} - + + {% capture avatar_url %} + {%- if site.avatar contains '://' -%} + {{ site.avatar }} + {%- elsif site.img_cdn != '' and site.img_cdn -%} + {{ site.avatar | prepend: site.img_cdn }} + {%- else -%} + {{ site.avatar | relative_url }} + {%- endif -%} + {% endcapture %} avatar