Skip to content

Commit

Permalink
fix(tempalte): empty not pass through correctly with liquid version 4
Browse files Browse the repository at this point in the history
  • Loading branch information
sparanoid committed Aug 18, 2017
1 parent ff2c5e9 commit fe7aa57
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
12 changes: 7 additions & 5 deletions _app/_includes/amsf/dates
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
{% include amsf/type type=include.type %}

{% comment %}
Page publish date
{% endcomment %}
{% capture amsf_page_pubdate %}{{ page.date }}{% endcapture %}
{% capture amsf_page_pubdate %}{{ type.date }}{% endcapture %}

{% comment %}
Page update date
{% endcomment %}
{% capture amsf_page_update %}
{% assign date_publish = page.date | date: "%b %-d, %Y" %}
{% assign date_update = page.last_modified_at | date: "%b %-d, %Y" %}
{% assign date_publish = type.date | date: "%b %-d, %Y" %}
{% assign date_update = type.last_modified_at | date: "%b %-d, %Y" %}

{% if date_publish != date_update %}
{{ page.last_modified_at }}
{{ type.last_modified_at }}
{% else %}
{{ page.date }}
{{ type.date }}
{% endif %}
{% endcapture %}
2 changes: 1 addition & 1 deletion _app/_includes/themes/curtana/includes/open-graph.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

{% 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 property="article:modified_time" content="{{ amsf_page_update | strip | 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">
Expand Down

0 comments on commit fe7aa57

Please sign in to comment.