{%   if page.description %}{% assign desc = page.description
%}{% else %}{% assign desc = page.title
%}{% endif

%}{% if page.author %}{% assign author = site.data.authors[page.author]
%}{% else %}{% assign author = site.data.authors[site.author]
%}{% endif

%}<title>{% if page.title %}{{ page.title }} – {% endif %}{{ site.title }}</title>
<link rel="canonical" href="{{ site.url }}{{ page.url }}">
{%   if author.name.first_name
%}{% if author.name.last_name
%}<meta name="author" content="{{ author.name.first_name }} {% if author.name.username %}“{{ author.name.username }}” {% endif %}{{ author.name.last_name }}">
{%   else
%}<meta name="author" content="{{ author.name.first_name }}, {{ author.name.username }}">
{%   endif
%}{% else
%}<meta name="author" content="{{ author.name.username }}">
{%   endif
%}{% if author.website
%}<link rel="author" href="{{ author.website }}">
{%   endif
%}<meta property="og:description" name="description" content="{{ desc }}">
<link rel="icon" type="image/png" href="{{ site.baseurl }}/favicon.png">
<!--[if IE]>
<link rel="shortcut-icon" type="image/ico" href="{{ site.baseurl }}/favicon.ico">
<[endif]-->

<!-- OpenGraph -->
<meta property="og:title" content="{% if page.title %}{{ page.title }}{% else %}{{ site.title }}{% endif %}">
<meta property="og:site_name" content="{{ site.title }}">
<meta property="og:url" content="{{ site.url }}{{ page.url }}">
{%   if page.layout == "post"
%}<meta property="og:type" content="article">
<meta property="article:published_time" content="{{ page.date | date_to_xmlschema }}">
{%   if author.name.first_name
%}<meta property="article:author:first_name" content="{{ author.name.first_name }}">
{% endif
%}{% if author.name.username
%}<meta property="article:author:username" content="{{ author.name.username }}">
{%   endif
%}{% if author.name.last_name
%}<meta property="article:author:last_name" content="{{ author.name.last_name }}">
{%   endif
%}{% if author.gender
%}<meta property="article:author:gender" content="{{ author.gender }}">
{%   endif
%}{% else
%}<meta property="og:type" content="website">
{%   endif
%}
<!-- Twitter -->
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="{% if page.title %}{{ page.title }}{% else %}{{ site.title }}{% endif %}">
<meta name="twitter:description" content="{{ desc }}">
<meta name="twitter:url" content="{{ site.url }}{{ page.url }}">
