1
0
mirror of https://github.com/cotes2020/jekyll-theme-chirpy.git synced 2025-12-18 05:41:31 +00:00

Fixed related URL.

This commit is contained in:
Cotes Chung
2020-01-06 04:11:30 +08:00
parent b534ab74de
commit ff9663f376
2 changed files with 8 additions and 5 deletions

View File

@@ -10,11 +10,12 @@
<div id="profile-wrapper" class="d-flex flex-column">
<div id="avatar" class="d-flex justify-content-center">
<a href="{{ site.baseurl }}/" alt="avatar">
{% assign avatar = site.avatar %}
{% if avatar | slice: 0 == '/' %}
{% assign avatar = avatar | prepend: site.baseurl %}
{% assign avatar_url = site.avatar %}
{% capture start %}{{ site.avatar | slice: 0 }}{% endcapture %}
{% if start == '/' %}
{% assign avatar_url = avatar_url | prepend: site.baseurl %}
{% endif %}
<img src="{{ avatar }}">
<img src="{{ avatar_url }}">
</a>
</div>