File tree Expand file tree Collapse file tree 1 file changed +6
-10
lines changed
Expand file tree Collapse file tree 1 file changed +6
-10
lines changed Original file line number Diff line number Diff line change @@ -45,21 +45,17 @@ <h1 data-toc-skip>{{ page.title }}</h1>
4545
4646 </ div > <!-- .post-meta -->
4747
48- {% capture post_content %}
4948 < div class ="post-content ">
5049 {% if page.image %}
5150 < img src ="{{ page.image }} ">
5251 {% endif %}
53- {{ content }}
52+ <!-- Add lozad class into image tags. see: <https://github.com/ApoorvSaxena/lozad.js#usage> -->
53+ {% if content contains '< img src =' %}
54+ {{ content | replace: '< img src =', '< img class ="lozad " src ="/assets/img/commons/loading.png " data-src =' }}
55+ {% else %}
56+ {{ content }}
57+ {% endif %}
5458 </div>
55- {% endcapture %}
56-
57- <!-- Add lozad class into image tags. see: <https://github.com/ApoorvSaxena/lozad.js#usage> -->
58- {% if post_content contains '< img src =' %}
59- {{ post_content | replace: '< img src =', '< img class ="lozad " src ="/assets/img/commons/loading.png " data-src =' }}
60- {% else %}
61- {{ post_content }}
62- {% endif %}
6359
6460 <div class="post-tail text-muted">
6561 <!-- Tags -->
You can’t perform that action at this time.
0 commit comments