2016-11-03 16:52:04 +01:00
<!-- begin SEO -->
{% if site.url %}
2017-10-04 17:17:45 +02:00
{% assign seo_url = site.url | append: site.baseurl %}
2016-11-03 16:52:04 +01:00
{% endif %}
{% assign seo_url = seo_url | default: site.github.url %}
{% if page.title %}
2017-10-04 17:17:45 +02:00
{% assign seo_title = page.title | append: " " | append: site.title_separator | append: " " | append: site.title %}
2016-11-03 16:52:04 +01:00
{% endif %}
{% if seo_title %}
2017-10-04 17:17:45 +02:00
{% assign seo_title = seo_title | markdownify | strip_html | strip_newlines | escape_once %}
2016-11-03 16:52:04 +01:00
{% endif %}
{% if site.url %}
2017-10-04 17:17:45 +02:00
{% assign canonical_url = page.url | replace: "index.html", "" | prepend: site.url %}
2016-11-03 16:52:04 +01:00
{% endif %}
< title > {{ seo_title | default: site.title }}{% if paginator %}{% unless paginator.page == 1 %} {{ site.title_separator }} {{ site.data.ui-text[site.locale].page | default: "Page" }} {{ paginator.page }}{% endunless %}{% endif %}< / title >
{% assign seo_description = page.description | default: page.excerpt | default: site.description %}
{% if seo_description %}
2017-10-04 17:17:45 +02:00
{% assign seo_description = seo_description | markdownify | strip_html | strip_newlines | escape_once %}
2016-11-03 16:52:04 +01:00
{% endif %}
2017-02-21 16:08:09 +01:00
< meta name = "description" content = "{{ seo_description }}" >
{% assign seo_author = page.author | default: page.author[0] | default: site.author.name %}
2016-11-03 16:52:04 +01:00
{% if seo_author %}
2017-10-04 17:17:45 +02:00
{% if seo_author.twitter %}
{% assign seo_author_twitter = seo_author.twitter %}
{% else %}
{% if site.data.authors and site.data.authors[seo_author] %}
{% assign seo_author_twitter = site.data.authors[seo_author].twitter %}
2016-11-03 16:52:04 +01:00
{% else %}
2017-10-04 17:17:45 +02:00
{% assign seo_author_twitter = seo_author %}
2016-11-03 16:52:04 +01:00
{% endif %}
2017-10-04 17:17:45 +02:00
{% endif %}
{% assign seo_author_twitter = seo_author_twitter | replace: "@", "" %}
2016-11-03 16:52:04 +01:00
{% endif %}
2017-02-21 16:08:09 +01:00
< meta name = "author" content = "{{ seo_author }}" >
2017-02-28 14:57:54 +01:00
< meta property = "og:locale" content = "{{ site.locale | replace: " - " , " _ " | default: " en_US " } } " >
2016-11-03 16:52:04 +01:00
< meta property = "og:site_name" content = "{{ site.title }}" >
< meta property = "og:title" content = "{{ page.title | default: site.title | markdownify | strip_html | strip_newlines | escape_once }}" >
{% if seo_url %}
2017-10-04 17:17:45 +02:00
< link rel = "canonical" href = "{{ page.url | prepend: seo_url | replace: " / index . html " , " / " } } " >
< meta property = "og:url" content = "{{ page.url | prepend: seo_url | replace: " / index . html " , " / " } } " >
2016-11-03 16:52:04 +01:00
{% endif %}
{% if page.excerpt %}
2017-10-04 17:17:45 +02:00
< meta property = "og:description" content = "{{ seo_description }}" >
2016-11-03 16:52:04 +01:00
{% endif %}
{% if site.twitter.username %}
2017-10-04 17:17:45 +02:00
< meta name = "twitter:site" content = "@{{ site.twitter.username | replace: " @ " , " " } } " >
< meta name = "twitter:title" content = "{{ page.title | default: site.title | markdownify | strip_html | strip_newlines | escape_once }}" >
< meta name = "twitter:description" content = "{{ seo_description }}" >
< meta name = "twitter:url" content = "{{ canonical_url }}" >
2016-11-03 16:52:04 +01:00
2017-10-04 17:17:45 +02:00
{% if page.header.image %}
< meta name = "twitter:card" content = "summary_large_image" >
< meta name = "twitter:image" content = "{% if page.header.image contains " : / / " % } { { page . header . image } } { % else % } { { page . header . image | absolute_url } } { % endif % } " >
{% else %}
< meta name = "twitter:card" content = "summary" >
{% if page.header.teaser %}
< meta name = "twitter:image" content = "{% if page.header.teaser contains " : / / " % } { { page . header . teaser } } { % else % } { { page . header . teaser | absolute_url } } { % endif % } " >
{% elsif site.og_image %}
< meta name = "twitter:image" content = "{{ site.og_image | absolute_url }}" >
2016-11-03 16:52:04 +01:00
{% endif %}
{% endif %}
2017-10-04 17:17:45 +02:00
{% if seo_author_twitter %}
< meta name = "twitter:creator" content = "@{{ seo_author_twitter }}" >
{% endif %}
{% endif %}
2016-11-03 16:52:04 +01:00
{% if site.facebook %}
2017-10-04 17:17:45 +02:00
{% if site.facebook.publisher %}
< meta property = "article:publisher" content = "{{ site.facebook.publisher }}" >
{% endif %}
2016-11-03 16:52:04 +01:00
2017-10-04 17:17:45 +02:00
{% if site.facebook.app_id %}
< meta property = "fb:app_id" content = "{{ site.facebook.app_id }}" >
{% endif %}
2016-11-03 16:52:04 +01:00
{% endif %}
{% if page.header.image %}
2017-10-04 17:17:45 +02:00
< meta property = "og:image" content = "{% if page.header.image contains " : / / " % } { { page . header . image } } { % else % } { { page . header . image | absolute_url } } { % endif % } " >
2016-11-03 16:52:04 +01:00
{% elsif page.header.overlay_image %}
2017-10-04 17:17:45 +02:00
< meta property = "og:image" content = "{% if page.header.overlay_image contains " : / / " % } { { page . header . overlay_image } } { % else % } { { page . header . overlay_image | absolute_url } } { % endif % } " >
2016-11-03 16:52:04 +01:00
{% elsif page.header.teaser %}
2017-10-04 17:17:45 +02:00
< meta property = "og:image" content = "{% if page.header.teaser contains " : / / " % } { { page . header . teaser } } { % else % } { { page . header . teaser | absolute_url } } { % endif % } " >
2016-11-03 16:52:04 +01:00
{% elsif site.og_image %}
2017-10-04 17:17:45 +02:00
< meta property = "og:image" content = "{% if site.og_image contains " : / / " % } { { site . og_image } } { % else % } { { site . og_image | absolute_url } } { % endif % } " >
2016-11-03 16:52:04 +01:00
{% endif %}
{% if page.date %}
2017-10-04 17:17:45 +02:00
< meta property = "og:type" content = "article" >
< meta property = "article:published_time" content = "{{ page.date | date_to_xmlschema }}" >
2016-11-03 16:52:04 +01:00
{% endif %}
{% if paginator.previous_page %}
2017-10-04 17:17:45 +02:00
< link rel = "prev" href = "{{ paginator.previous_page_path | prepend: seo_url }}" >
2016-11-03 16:52:04 +01:00
{% endif %}
{% if paginator.next_page %}
2017-10-04 17:17:45 +02:00
< link rel = "next" href = "{{ paginator.next_page_path | prepend: seo_url }}" >
2016-11-03 16:52:04 +01:00
{% endif %}
{% if site.og_image %}
2017-10-04 17:17:45 +02:00
< script type = "application/ld+json" >
{
"@context": "http://schema.org",
"@type": "Organization",
"url": {{ seo_url | jsonify }},
"logo": {{ site.og_image | absolute_url | jsonify }}
}
< / script >
2016-11-03 16:52:04 +01:00
{% endif %}
{% if site.social %}
2017-10-04 17:17:45 +02:00
< script type = "application/ld+json" >
{
"@context" : "http://schema.org",
"@type" : "{% if site.social.type %}{{ site.social.type }}{% else %}Person{% endif %}",
"name" : "{{ site.social.name | default: site.name }}",
"url" : {{ seo_url | jsonify }},
"sameAs" : {{ site.social.links | jsonify }}
}
< / script >
2016-11-03 16:52:04 +01:00
{% endif %}
{% if site.google_site_verification %}
2017-10-04 17:17:45 +02:00
< meta name = "google-site-verification" content = "{{ site.google_site_verification }}" / >
2016-11-03 16:52:04 +01:00
{% endif %}
{% if site.bing_site_verification %}
2017-10-04 17:17:45 +02:00
< meta name = "msvalidate.01" content = "{{ site.bing_site_verification }}" >
2016-11-03 16:52:04 +01:00
{% endif %}
{% if site.alexa_site_verification %}
2017-10-04 17:17:45 +02:00
< meta name = "alexaVerifyID" content = "{{ site.alexa_site_verification }}" >
2016-11-03 16:52:04 +01:00
{% endif %}
{% if site.yandex_site_verification %}
2017-10-04 17:17:45 +02:00
< meta name = "yandex-verification" content = "{{ site.yandex_site_verification }}" >
{% endif %}
{% if site.naver-site-verification %}
< meta name = "naver-site-verification" content = "{{ site.naver-site-verification }}" >
2016-11-03 16:52:04 +01:00
{% endif %}
<!-- end SEO -->