Merge branch 'master' into production
This commit is contained in:
commit
8c30b41e20
2 changed files with 14 additions and 6 deletions
|
@ -26,7 +26,7 @@
|
||||||
{%- capture old_url -%}{{ src | absolute_url }}{%- endcapture -%}
|
{%- capture old_url -%}{{ src | absolute_url }}{%- endcapture -%}
|
||||||
{%- capture new_url -%}{{ img_url }}{%- endcapture -%}
|
{%- capture new_url -%}{{ img_url }}{%- endcapture -%}
|
||||||
|
|
||||||
{% assign seo_tags = seo_tags | replace: old, new %}
|
{% assign seo_tags = seo_tags | replace: old_url, new_url %}
|
||||||
{% endunless %}
|
{% endunless %}
|
||||||
|
|
||||||
{% elsif site.social_preview_image %}
|
{% elsif site.social_preview_image %}
|
||||||
|
|
|
@ -12,13 +12,21 @@
|
||||||
{% assign url = include.src %}
|
{% assign url = include.src %}
|
||||||
|
|
||||||
{%- if url -%}
|
{%- if url -%}
|
||||||
{%- comment -%} CND URL {%- endcomment -%}
|
{% unless url contains ':' %}
|
||||||
{% assign prefix = site.img_cdn | default: '' | relative_url %}
|
{%- comment -%} CND URL {%- endcomment -%}
|
||||||
|
{% assign prefix = site.img_cdn | default: '' | relative_url %}
|
||||||
|
|
||||||
{%- comment -%} Add page image path prefix {%- endcomment -%}
|
{%- comment -%} Add page image path prefix {%- endcomment -%}
|
||||||
{% assign url = include.img_path | default: '' | append: '/' | append: url %}
|
{% 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 -%}
|
{%- endif -%}
|
||||||
|
|
||||||
{{- url -}}
|
{{- url -}}
|
||||||
|
|
Loading…
Reference in a new issue