fix: og:image
will be incorrect if the image uses a cross-domain URL
This commit is contained in:
parent
4b6ccbcbcc
commit
8de1abda6b
1 changed files with 17 additions and 12 deletions
|
@ -24,6 +24,8 @@
|
|||
|
||||
{% if page.image %}
|
||||
{% assign img = page.image.path | default: page.image %}
|
||||
|
||||
{% unless img contains '://' %}
|
||||
{% assign img_path = page.img_path | append: '/' | append: img | replace: '//', '/' %}
|
||||
{% capture target %}"{{ img | absolute_url }}"{% endcapture %}
|
||||
|
||||
|
@ -38,6 +40,9 @@
|
|||
{% endif %}
|
||||
|
||||
{% assign seo_tags = seo_tags | replace: target, replacement %}
|
||||
|
||||
{% endunless %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{{ seo_tags }}
|
||||
|
|
Loading…
Reference in a new issue