1
0
mirror of https://github.com/cotes2020/jekyll-theme-chirpy.git synced 2025-12-18 21:53:26 +00:00

Merge branch 'hotfix/4.3.1'

This commit is contained in:
Cotes Chung
2021-10-01 18:49:10 +08:00
parent 945e8d1953
commit 8877393fba
13 changed files with 25 additions and 23 deletions

View File

@@ -6,16 +6,18 @@
<div class="profile-wrapper text-center">
<div id="avatar">
<a href="{{ '/' | relative_url }}" alt="avatar" class="mx-auto">
{% 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 %}
<img src="{{ avatar_url }}" alt="avatar" onerror="this.style.display='none'">
{% if site.avatar != '' and site.avatar %}
{% 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 %}
<img src="{{ avatar_url }}" alt="avatar" onerror="this.style.display='none'">
{% endif %}
</a>
</div>