2016-04-14 20:45:48 +02:00
{% include base_path %}
2016-02-23 06:17:39 +01:00
<!-- begin SEO -->
{% if site.url %}
{% assign seo_url = site.url | append: site.baseurl %}
{% endif %}
{% assign seo_url = seo_url | default: site.github.url %}
{% if page.title %}
{% assign seo_title = page.title | append: " " | append: site.title_separator | append: " " | append: site.title %}
{% endif %}
{% if seo_title %}
{% assign seo_title = seo_title | markdownify | strip_html | strip_newlines | escape_once %}
{% endif %}
{% if site.url %}
{% assign canonical_url = page.url | replace: "index.html", "" | prepend: site.url %}
{% endif %}
2016-03-24 02:49:01 +01:00
< title > {{ seo_title | default: site.title }}{% if paginator %}{% unless paginator.page == 1 %} {{ site.title_separator }} {{ site.data.ui-text[site.locale].page }} {{ paginator.page }}{% endunless %}{% endif %}< / title >
2016-02-23 06:17:39 +01:00
{% assign seo_description = page.description | default: page.excerpt | default: site.description %}
{% if seo_description %}
{% assign seo_description = seo_description | markdownify | strip_html | strip_newlines | escape_once %}
{% endif %}
{% assign seo_author = page.author | default: page.authors[0] | default: site.author %}
{% if seo_author %}
{% 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 %}
{% else %}
{% assign seo_author_twitter = seo_author %}
{% endif %}
{% endif %}
2016-02-23 16:13:15 +01:00
{% assign seo_author_twitter = seo_author_twitter | replace: "@", "" %}
2016-02-23 06:17:39 +01:00
{% endif %}
< meta property = "og:locale" content = "{{ site.locale }}" >
< meta property = "og:site_name" content = "{{ site.title }}" >
2016-02-23 16:13:15 +01:00
< meta property = "og:title" content = "{{ page.title | default: site.title | markdownify | strip_html | strip_newlines | escape_once }}" >
2016-02-23 06:17:39 +01:00
{% if seo_url %}
2016-02-23 16:13:15 +01: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-02-23 06:17:39 +01:00
{% endif %}
{% if page.excerpt %}
< meta property = "og:description" content = "{{ seo_description }}" >
{% endif %}
{% if site.twitter %}
2016-02-23 16:13:15 +01: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 }}" >
2016-02-23 06:17:39 +01:00
< meta name = "twitter:url" content = "{{ canonical_url }}" >
2016-02-25 03:23:29 +01:00
{% if page.header.image %}
2016-02-23 06:17:39 +01:00
< meta name = "twitter:card" content = "summary_large_image" >
2016-03-07 16:27:07 +01:00
< meta name = "twitter:image" content = "{% if page.header.image contains " http " % } { { page . header . image } } { % else % } { { page . header . image | prepend: " / images / " | prepend: base_path } } { % endif % } " >
2016-02-23 06:17:39 +01:00
{% else %}
< meta name = "twitter:card" content = "summary" >
2016-04-06 21:50:10 +02:00
{% if site.og_image %}
< meta name = "twitter:image" content = "{{ site.og_image | prepend: " / images / " | prepend: base_path } } " >
2016-02-25 03:23:29 +01:00
{% endif %}
2016-02-23 06:17:39 +01:00
{% endif %}
{% if seo_author_twitter %}
2016-02-23 16:13:15 +01:00
< meta name = "twitter:creator" content = "@{{ seo_author_twitter }}" >
2016-02-23 06:17:39 +01:00
{% endif %}
{% endif %}
{% if site.facebook %}
{% if site.facebook.publisher %}
2016-02-23 16:13:15 +01:00
< meta property = "article:publisher" content = "{{ site.facebook.publisher }}" >
2016-02-23 06:17:39 +01:00
{% endif %}
{% if site.facebook.app_id %}
2016-02-23 16:13:15 +01:00
< meta property = "fb:app_id" content = "{{ site.facebook.app_id }}" >
2016-02-23 06:17:39 +01:00
{% endif %}
{% endif %}
2016-02-25 03:23:29 +01:00
{% if page.header.image %}
2016-03-07 16:27:07 +01:00
< meta property = "og:image" content = "{% if page.header.image contains " http " % } { { page . header . image } } { % else % } { { page . header . image | prepend: " / images / " | prepend: base_path } } { % endif % } " >
2016-02-23 06:17:39 +01:00
{% endif %}
{% if page.date %}
< meta property = "og:type" content = "article" >
2016-02-23 16:13:15 +01:00
< meta property = "article:published_time" content = "{{ page.date | date_to_xmlschema }}" >
2016-02-23 06:17:39 +01:00
{% if page.next.url %}
2016-02-23 16:13:15 +01:00
< link rel = "next" href = "{{ page.next.url | prepend: seo_url | replace: " / index . html " , " / " } } " title = "{{ page.next.title | escape }}" >
2016-02-23 06:17:39 +01:00
{% endif %}
{% if page.previous.url %}
2016-02-23 16:13:15 +01:00
< link rel = "prev" href = "{{ page.previous.url | prepend: seo_url | replace: " / index . html " , " / " } } " title = "{{ page.previous.title | escape }}" >
2016-02-23 06:17:39 +01:00
{% endif %}
{% endif %}
2016-04-06 21:50:10 +02:00
{% if site.og_image %}
2016-02-23 06:17:39 +01:00
< script type = "application/ld+json" >
{
"@context": "http://schema.org",
"@type": "Organization",
"url": {{ seo_url | jsonify }},
2016-04-06 21:50:10 +02:00
"logo": {{ site.og_image | prepend: "/" | prepend: seo_url | jsonify }}
2016-02-23 06:17:39 +01:00
}
< / script >
{% endif %}
{% if site.social %}
< script type = "application/ld+json" >
{
"@context" : "http://schema.org",
"@type" : "{% if site.social.type %}{{ site.social.type }}{% else %}person{% endif %}",
2016-02-23 16:13:15 +01:00
"name" : "{{ site.social.name | default: site.name }}",
2016-02-23 06:17:39 +01:00
"url" : {{ seo_url | jsonify }},
"sameAs" : {{ site.social.links | jsonify }}
}
< / script >
{% endif %}
{% if site.google_site_verification %}
< meta name = "google-site-verification" content = "{{ site.google_site_verification }}" / >
{% endif %}
{% if site.bing_site_verification %}
< meta name = "msvalidate.01" content = "{{ site.bing_site_verification }}" >
{% endif %}
{% if site.owner.alexa.verify %}
< meta name = "alexaVerifyID" content = "{{ site.alexa_site_verification }}" >
{% endif %}
{% if site.owner.yandex.verify %}
< meta name = "yandex-verification" content = "{{ site.yandex_site_verification }}" >
{% endif %}
<!-- end SEO -->