Skip to content

Commit

Permalink
fix(head): fix some issue of date format
Browse files Browse the repository at this point in the history
Merge pull request #380 from viosey/fix/head/structured-data
  • Loading branch information
neoFelhz committed Jun 6, 2017
2 parents 1ac6f1b + c4f10b8 commit f48e873
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions layout/_partial/head.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,8 @@
<% if(page.tags && page.tags.each) { page.tags.each(function(tag){ %><meta property="og:article:tag" content="<%= tag.name %>"> <% })} %>

<% if( (is_post()) ) { %>
<meta property="article:published_time" content="<%= date(page.date, 'MMM DD, YYYY') %>" />
<meta property="article:modified_time" content="<%= date(page.updated, 'MMM DD, YYYY') %>" />
<meta property="article:published_time" content="<%= page.date %>" />
<meta property="article:modified_time" content="<%= page.updated %>" />
<% } %>

<!-- The Twitter Card protocol -->
Expand Down
4 changes: 2 additions & 2 deletions layout/_partial/structured-data.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@
},
"headline": "<%- page.title %>",
"url": "<%- config.url + url_for(path) %>",
"datePublished": "<%= date(page.date, 'MMM DD, YYYY') %>",
"dateModified": "<%= date(page.updated, 'MMM DD, YYYY') %>",
"datePublished": "<%= page.date %>",
"dateModified": "<%= page.updated %>",
"description": "<% if(page.description) { %><%= page.description %><% } else if(page.excerpt){ %><%= strip_html(page.excerpt).replace(/^s*/, '').replace(/s*$/, '') %><% } else if (config.description){ %><%= config.description %><% } %>",
"mainEntityOfPage": {
"@type": "WebPage",
Expand Down

0 comments on commit f48e873

Please sign in to comment.