{%- if site.url -%}
{%- assign seo_url = site.url | append: site.baseurl -%}
{%- endif -%}
{%- assign seo_url = seo_url | default: site.github.url -%}
{% assign title_separator = site.title_separator | default: '-' | replace: '|', '|' %}
{%- if page.title -%}
{%- assign seo_title = page.title | append: " " | append: title_separator | append: " " | append: site.title -%}
{%- endif -%}
{%- if seo_title -%}
{%- assign seo_title = seo_title | markdownify | strip_html | strip_newlines | escape_once -%}
{%- endif -%}
{% if page.canonical_url %}
{%- assign canonical_url = page.canonical_url %}
{% else %}
{%- assign canonical_url = page.url | replace: "index.html", "" | absolute_url %}
{% endif %}
{%- assign seo_description = page.description | default: page.excerpt | default: site.description -%}
{%- if seo_description -%}
{%- assign seo_description = seo_description | markdownify | strip_html | newline_to_br | strip_newlines | replace: '
', ' ' | escape_once -%}
{%- endif -%}
{%- assign author = page.author | default: page.authors[0] | default: site.author -%}
{%- assign author = site.data.authors[author] | default: author -%}
{%- if author.twitter -%}
{%- assign author_twitter = author.twitter | replace: "@", "" -%}
{%- endif -%}
{%- assign page_large_image = page.header.og_image | default: page.header.overlay_image | default: page.header.image | absolute_url -%}
{%- assign page_large_image = page_large_image | escape -%}
{%- assign page_teaser_image = page.header.teaser | default: site.og_image | absolute_url -%}
{%- assign page_teaser_image = page_teaser_image | escape -%}
{%- assign site_og_image = site.og_image | absolute_url -%}
{%- assign site_og_image = site_og_image | escape -%}
{%- if page.date -%}
{%- assign og_type = "article" -%}
{%- else -%}
{%- assign og_type = "website" -%}
{%- endif -%}