From 59b5562487bc815f82b8cd7cf3b5ed58ff5e5c2a Mon Sep 17 00:00:00 2001
From: Cotes Chung <11371340+cotes2020@users.noreply.github.com>
Date: Thu, 17 Nov 2022 00:45:38 +0800
Subject: [PATCH] fix(seo): incorrect image URL for `` tag(#754)
This issue occurs when setting the `img_path` of the post or the `baseurl` of the site configuration.
---
_includes/head.html | 24 +++++++++++++++---------
1 file changed, 15 insertions(+), 9 deletions(-)
diff --git a/_includes/head.html b/_includes/head.html
index 0947587d3d2..4892bc2a062 100644
--- a/_includes/head.html
+++ b/_includes/head.html
@@ -22,22 +22,28 @@
{% seo title=false %}
{% endcapture %}
- {% if site.img_cdn and seo_tags contains 'og:image' %}
+ {% if seo_tags contains ':image' %}
{% assign properties = 'og:image,twitter:image' | split: ',' %}
{% for prop in properties %}
- {% if site.img_cdn contains '//' %}
-
- {% capture target %}