Fixed related URL.
This commit is contained in:
parent
b534ab74de
commit
ff9663f376
2 changed files with 8 additions and 5 deletions
|
@ -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>
|
||||
|
||||
|
|
|
@ -53,7 +53,9 @@ layout: default
|
|||
{% endif %}
|
||||
<!-- Add lozad class into image tags. see: <https://github.com/ApoorvSaxena/lozad.js#usage> -->
|
||||
{% if content contains '<img src=' %}
|
||||
{{ content | replace: '<img src=', '<img class="lozad" src="/assets/img/commons/loading.png" data-src=' }}
|
||||
{% capture loading %}{{ "/assets/img/commons/loading.png" | relative_url }}{% endcapture %}
|
||||
{% assign replacement = '<img class="lozad" src=' | append: loading | append: ' data-src=' %}
|
||||
{{ content | replace: '<img src=', replacement }}
|
||||
{% else %}
|
||||
{{ content }}
|
||||
{% endif %}
|
||||
|
|
Loading…
Reference in a new issue