Skip to content

Commit

Permalink
fix(template): avoid extra meta for non-post page
Browse files Browse the repository at this point in the history
  • Loading branch information
sparanoid committed Dec 17, 2015
1 parent 0ff110b commit 68a2071
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions _app/_includes/themes/curtana/includes/open-graph.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,21 @@
<meta property="og:title" content="{{ amsf_page_title }}">
<meta property="og:url" content="{{ amsf_page_url }}">
<meta property="og:description" content="{{ amsf_site_desc | strip }}">
<meta property="article:published_time" content="{{ amsf_page_pubdate | date_to_xmlschema }}">
<meta property="article:modified_time" content="{{ amsf_page_update | date_to_xmlschema }}">

<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="{{ amsf_page_title }}">
<meta name="twitter:url" content="{{ amsf_page_url }}">
<meta name="twitter:description" content="{{ amsf_site_desc | strip }}">
<meta name="twitter:label1" value="Words">
<meta name="twitter:data1" value="{{ amsf_page_words | strip }}">
<meta name="twitter:label2" value="Reading time">
<meta name="twitter:data2" value="{{ amsf_page_reading_time | strip }}">

{% if page.path contains '_posts' %}
<meta property="article:published_time" content="{{ amsf_page_pubdate | date_to_xmlschema }}">
<meta property="article:modified_time" content="{{ amsf_page_update | date_to_xmlschema }}">

<meta name="twitter:label1" value="Words">
<meta name="twitter:data1" value="{{ amsf_page_words | strip }}">
<meta name="twitter:label2" value="Reading time">
<meta name="twitter:data2" value="{{ amsf_page_reading_time | strip }}">
{% endif %}

{% if site.twitter %}
<meta name="twitter:site" content="@{{ site.twitter }}">
Expand Down

0 comments on commit 68a2071

Please sign in to comment.