{%- 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 media-url.html src=src subpath=page.media_subpath 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 media-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 }} {%- unless page.layout == 'home' -%} {{ page.title | append: ' | ' }} {%- endunless -%} {{ site.title }} {% include_cached favicons.html %} {% unless site.assets.self_host.enabled %} {% for hint in site.data.origin.cors.resource_hints %} {% for link in hint.links %} {% endfor %} {% endfor %} {% endunless %} {% unless jekyll.environment == 'production' %} {% endunless %} {% if site.toc and page.toc %} {% endif %} {% if page.layout == 'post' or page.layout == 'page' or page.layout == 'home' %} {% endif %} {% if page.layout == 'page' or page.layout == 'post' %} {% endif %} {% unless site.theme_mode %} {% include mode-toggle.html %} {% endunless %} {% include metadata-hook.html %}