Skip to content

Instantly share code, notes, and snippets.

@juev
Forked from pathawks/meta.html
Created May 1, 2013 08:16
Show Gist options
  • Save juev/5494292 to your computer and use it in GitHub Desktop.
Save juev/5494292 to your computer and use it in GitHub Desktop.
{% capture header %}
{% if page.title %}
<meta property="og:type" content="article" />
<meta property="og:title" content="{{ page.title }}" />
{% else %}
<meta property="og:type" content="website" />
{% endif %}
{% if site.title %}
<meta property="og:site_name" content="{{ site.title }}" />
{% endif %}
{% if page.url %}
<meta property="og:url" content="{{ site.url }}{{ page.url }}" />
{% endif %}
{% if page.date %}
<meta property="article:published_time" content="{{page.date | date_to_xmlschema}}" />
{% endif %}
{% if site.owner_link %}
<meta property="article:author" content="{{ site.owner_link }}" />
{% endif %}
{% endcapture %}{{ header | strip_newlines }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment