Skip to content

Commit

Permalink
Merge branch 'hotfix/6.5.4' into production
Browse files Browse the repository at this point in the history
  • Loading branch information
cotes2020 committed Mar 22, 2024
2 parents 0a6c1fb + 74cf57a commit e15eaaf
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 16 deletions.
2 changes: 1 addition & 1 deletion _includes/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
{%- endcapture -%}

{%- capture twitter_image -%}
<meta property="twitter:card" content="summary_large_image" />
<meta name="twitter:card" content="summary_large_image" />
<meta property="twitter:image" content="{{ img_url }}" />
{%- endcapture -%}

Expand Down
32 changes: 17 additions & 15 deletions _includes/img-url.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,24 +14,26 @@

{%- if url -%}
{% unless url contains ':' %}
{%- comment -%} CND URL {%- endcomment -%}
{% assign prefix = site.img_cdn | default: '' %}

{%- 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: ':', ':/'
%}

{% if include.absolute %}
{% assign url = site.url | append: site.baseurl | append: url %}
{% else %}
{% assign url = site.baseurl | append: url %}
{%- comment -%} CND URL {%- endcomment -%}
{% if site.img_cdn %}
{% assign url = site.img_cdn
| append: '/'
| append: url
| replace: '///', '/'
| replace: '//', '/'
| replace: ':/', '://'
%}

{% unless site.img_cdn contains ':' %}
{% if include.absolute %}
{% assign url = site.url | append: site.baseurl | append: url %}
{% else %}
{% assign url = site.baseurl | append: url %}
{% endif %}
{% endunless %}
{% endif %}
{% endunless %}
{%- endif -%}
Expand Down

0 comments on commit e15eaaf

Please sign in to comment.