Skip to content

Instantly share code, notes, and snippets.

@solarsailer
Forked from pathawks/meta.html
Created September 25, 2013 08:05
Show Gist options
  • Save solarsailer/6696512 to your computer and use it in GitHub Desktop.
Save solarsailer/6696512 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