Skip to content

Commit

Permalink
Merge branch 'master' into production
Browse files Browse the repository at this point in the history
  • Loading branch information
cotes2020 committed Jan 10, 2024
2 parents 7efbed6 + b2d1cb6 commit 8c30b41
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
2 changes: 1 addition & 1 deletion _includes/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
{%- capture old_url -%}{{ src | absolute_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 %}

{% elsif site.social_preview_image %}
Expand Down
18 changes: 13 additions & 5 deletions _includes/img-url.html
Original file line number Diff line number Diff line change
Expand Up @@ -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 -}}

0 comments on commit 8c30b41

Please sign in to comment.