{% capture header %} {% if page.description %} {% else %} {% endif %} {% if page.date %} {% endif %} {% if page.robots %} {% endif %} {% if page.next.url %} {% endif %} {% if page.previous.url %} {% endif %} {% if page.title %} {% else %} {% endif %} {% include meta.html property="og:site_name" content=site.title %} {% if page.featured_image %} {% capture img_url %} {{ page.featured_image | asset_path | prepend: site.url | prepend: site.baseurl }} {% endcapture %} {% else %} {% capture img_url %} {{ site.icon | asset_path | prepend: site.url | prepend: site.baseurl }} {% endcapture %} {% endif %} {% include meta.html property="og:image" content=img_url %} {% capture page_url %}{{ page.url | replace:'index.html','' | prepend: site.url | prepend: site.baseurl }}{% endcapture %} {% include meta.html property="og:url" content=page_url %} {% if page.date %} {% capture page_date %}{{page.date | date_to_xmlschema}}{% endcapture %} {% include meta.html property="article:published_time" content=page_date %} {% endif %} {% if page.author.url %} {% elsif site.owner_link %} {% endif %} {% if page.featured_image %} {% capture twitter_image %} {{ page.featured_image | asset_path | prepend: site.url | prepend: site.baseurl }} {% endcapture %} {% else %} {% capture twitter_image %} {{ site.icon | asset_path | prepend: site.url | prepend: site.baseurl }} {% endcapture %} {% endif %} {% for post in site.related_posts limit:3 %} {% endfor %} {% if page.categories %} {% for category in page.categories limit:1 %} {% endfor %} {% endif %} {% if page.tags %} {% for tag in page.tags %} {% endfor %} {% endif %} {% endcapture %}{{ header | strip_newlines }}