Skip to content

Commit cef8a97

Browse files
committed
Merge branch 'hotfix/6.5.5' into production
2 parents e559452 + 2d649aa commit cef8a97

File tree

2 files changed

+14
-16
lines changed

2 files changed

+14
-16
lines changed

_includes/img-url.html

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -17,24 +17,20 @@
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

docs/CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ All notable changes to this project will be documented in this file. See [standa
1111

1212
## [6.5.3](https://github.com/cotes2020/jekyll-theme-chirpy/compare/v6.5.2...v6.5.3) (2024-03-07)
1313

14+
* replace `polyfill.io` with `cdnjs` hosted link ([#1598](https://github.com/cotes2020/jekyll-theme-chirpy/pull/1598)) ([75a3d73](https://github.com/cotes2020/jekyll-theme-chirpy/commit/75a3d7399b257256a09d602cbe01062fe1cdf68d))
15+
1416
## [6.5.2](https://github.com/cotes2020/jekyll-theme-chirpy/compare/v6.5.1...v6.5.2) (2024-02-29)
1517

1618
### Bug Fixes

0 commit comments

Comments
 (0)