File tree Expand file tree Collapse file tree 2 files changed +26
-3
lines changed
Expand file tree Collapse file tree 2 files changed +26
-3
lines changed Original file line number Diff line number Diff line change 2323
2424 {% endif %}
2525
26- {% seo title=false %}
26+ {% capture seo_tags %}
27+ {% seo title=false %}
28+ {% endcapture %}
29+
30+ {% if site.img_cdn and seo_tags contains 'og:image' %}
31+ {% assign properties = 'og:image,twitter:image' | split: ',' %}
32+
33+ {% for prop in properties %}
34+ {% if site.img_cdn contains '//' %}
35+ <!-- `site.img_cdn` cross-origin URL -->
36+ {% capture target %}< meta property ="{{ prop }} " content ="{{ site.url }}{% endcapture %}
37+ {% capture replacement %}<meta property= "{{ prop }} " content="{{ site.img_cdn }}{% endcapture %}
38+ {% else %}
39+ <!-- `site.img_cdn` is a local file path -->
40+ {% capture target %}<meta property= "{{ prop }} " content="{{ site.url }}{{ site.baseurl }}{% endcapture %}
41+ {% assign replacement = target | append: site.img_cdn %}
42+ {% endif %}
43+
44+ {% assign seo_tags = seo_tags | replace: target, replacement %}
45+
46+ {% endfor %}
47+ {% endif %}
48+
49+ {{ seo_tags }}
2750
2851 <title>
2952 {%- unless page.layout == "home " -%}
Original file line number Diff line number Diff line change 1111
1212{% include lang.html %}
1313
14- {% if page.image.src %}
14+ {% if page.image.path %}
1515 {% capture bg %}
1616 {% unless page.image.no_bg %}{{ 'bg' }}{% endunless %}
1717 {% endcapture %}
18- < img src ="{{ page.image.src }} " class ="preview-img {{ bg | strip }} "
18+ < img src ="{{ page.image.path }} " class ="preview-img {{ bg | strip }} "
1919 alt ="{{ page.image.alt | default: "Preview Image " }}"
2020
2121 {% if page.image.width %}
You can’t perform that action at this time.
0 commit comments