{%- capture seo_tags -%} {% seo title=false %} {%- endcapture -%} {% if page.image %} {% assign src = page.image.path | default: page.image %} {% unless src contains '://' %} {%- capture img_url -%} {% include img-url.html src=src img_path=page.img_path absolute=true %} {%- endcapture -%} {%- capture old_url -%}{{ src | absolute_url }}{%- endcapture -%} {%- capture new_url -%}{{ img_url }}{%- endcapture -%} {% assign seo_tags = seo_tags | replace: old_url, new_url %} {% endunless %} {% elsif site.social_preview_image %} {%- capture img_url -%} {% include img-url.html src=site.social_preview_image absolute=true %} {%- endcapture -%} {%- capture og_image -%} {%- endcapture -%} {%- capture twitter_image -%} {%- endcapture -%} {% assign old_meta_clip = '' %} {% assign new_meta_clip = og_image | append: twitter_image %} {% assign seo_tags = seo_tags | replace: old_meta_clip, new_meta_clip %} {% endif %} {{ seo_tags }}