mirror of
https://github.com/cotes2020/jekyll-theme-chirpy.git
synced 2025-12-24 08:37:13 +00:00
@@ -12,13 +12,21 @@
|
||||
{% assign url = include.src %}
|
||||
|
||||
{%- if url -%}
|
||||
{%- comment -%} CND URL {%- endcomment -%}
|
||||
{% assign prefix = site.img_cdn | default: '' | relative_url %}
|
||||
{% unless url contains ':' %}
|
||||
{%- comment -%} CND URL {%- endcomment -%}
|
||||
{% assign prefix = site.img_cdn | default: '' | relative_url %}
|
||||
|
||||
{%- comment -%} Add page image path prefix {%- endcomment -%}
|
||||
{% assign url = include.img_path | default: '' | append: '/' | append: url %}
|
||||
{%- comment -%} Add page image path prefix {%- endcomment -%}
|
||||
{% assign url = include.img_path | default: '' | append: '/' | append: url %}
|
||||
|
||||
{% assign url = prefix | append: '/' | append: url | replace: '///', '/' | replace: '//', '/' | replace: ':', ':/' %}
|
||||
{% assign url = prefix
|
||||
| append: '/'
|
||||
| append: url
|
||||
| replace: '///', '/'
|
||||
| replace: '//', '/'
|
||||
| replace: ':', ':/'
|
||||
%}
|
||||
{% endunless %}
|
||||
{%- endif -%}
|
||||
|
||||
{{- url -}}
|
||||
|
||||
Reference in New Issue
Block a user