File tree Expand file tree Collapse file tree 1 file changed +12
-16
lines changed
Expand file tree Collapse file tree 1 file changed +12
-16
lines changed Original file line number Diff line number Diff line change 1717 {%- comment -%} Add page image path prefix {%- endcomment -%}
1818 {% assign url = include.img_path | default: '' | append: '/' | append: url %}
1919
20- {%- comment -%} CND URL {%- endcomment -%}
20+ {%- comment -%} Prepend CND URL {%- endcomment -%}
2121 {% if site.img_cdn %}
22- {% assign url = site.img_cdn
23- | append: '/'
24- | append: url
25- | replace: '///', '/'
26- | replace: '//', '/'
27- | replace: ':/', '://'
28- %}
29-
30- {% unless site.img_cdn contains ':' %}
31- {% if include.absolute %}
32- {% assign url = site.url | append: site.baseurl | append: url %}
33- {% else %}
34- {% assign url = site.baseurl | append: url %}
35- {% endif %}
36- {% endunless %}
22+ {% assign url = site.img_cdn | append: '/' | append: url %}
3723 {% endif %}
24+
25+ {% assign url = url | replace: '///', '/' | replace: '//', '/' | replace: ':/', '://' %}
26+
27+ {% unless url contains '://' %}
28+ {% if include.absolute %}
29+ {% assign url = site.url | append: site.baseurl | append: url %}
30+ {% else %}
31+ {% assign url = site.baseurl | append: url %}
32+ {% endif %}
33+ {% endunless %}
3834 {% endunless %}
3935{%- endif -%}
4036
You can’t perform that action at this time.
0 commit comments