_includes/head.html in jekyll-theme-chirpy-5.3.2 vs _includes/head.html in jekyll-theme-chirpy-5.4.0
- old
+ new
@@ -22,23 +22,28 @@
{% seo title=false %}
{% endcapture %}
{% if page.image %}
{% assign img = page.image.path | default: page.image %}
- {% assign img_path = page.img_path | append: '/' | append: img | replace: '//', '/' %}
- {% capture target %}"{{ img | absolute_url }}"{% endcapture %}
- {% if site.img_cdn contains '//' %}
- <!-- it's a cross-origin URL -->
- {% capture replacement %}"{{ site.img_cdn }}{{ img_path }}"{% endcapture %}
- {% else %}
- <!-- it's a local file path -->
- {%- capture replacement -%}
- "{{ site.img_cdn | append: '/' | append: img_path | replace: '//', '/' | absolute_url }}"
- {%- endcapture -%}
- {% endif %}
+ {% unless img contains '://' %}
+ {% assign img_path = page.img_path | append: '/' | append: img | replace: '//', '/' %}
+ {% capture target %}"{{ img | absolute_url }}"{% endcapture %}
- {% assign seo_tags = seo_tags | replace: target, replacement %}
+ {% if site.img_cdn contains '//' %}
+ <!-- it's a cross-origin URL -->
+ {% capture replacement %}"{{ site.img_cdn }}{{ img_path }}"{% endcapture %}
+ {% else %}
+ <!-- it's a local file path -->
+ {%- capture replacement -%}
+ "{{ site.img_cdn | append: '/' | append: img_path | replace: '//', '/' | absolute_url }}"
+ {%- endcapture -%}
+ {% endif %}
+
+ {% assign seo_tags = seo_tags | replace: target, replacement %}
+
+ {% endunless %}
+
{% endif %}
{{ seo_tags }}
<title>