fix(microformat): update syntax to h-entry of microformats2

* http://microformats.org/wiki/h-entry
* replaces hAtom
This commit is contained in:
curben 2019-06-28 00:41:35 +09:30
parent 8ce99181a4
commit 2d097644fd
5 changed files with 9 additions and 9 deletions

View File

@ -1,17 +1,17 @@
<article id="<%= post.layout %>-<%= post.slug %>" class="article article-type-<%= post.layout %>" itemprop="blogPost" itemscope itemtype="https://schema.org/BlogPosting">
<article id="<%= post.layout %>-<%= post.slug %>" class="h-entry article article-type-<%= post.layout %>" itemprop="blogPost" itemscope itemtype="https://schema.org/BlogPosting">
<%- partial('_partial/header') %>
<hr/>
<div class="hentry article-inner">
<div class="article-inner">
<%- partial('post/gallery') %>
<% if (post.link || post.title) { %>
<header class="article-header">
<%- partial('post/title', {class_name: 'entry-title article-title'}) %>
<%- partial('post/title', {class_name: 'p-name entry-title article-title'}) %>
</header>
<% } %>
<% if (post.subtitle) { %>
<p class="entry-summary"><%- post.subtitle %></p>
<p class="p-summary"><%- post.subtitle %></p>
<% } %>
<div class="entry-content article-entry typo" itemprop="articleBody">
<div class="e-content article-entry typo" itemprop="articleBody">
<%- toc(page.content, {list_number: false}) %>
<%- post.content %>
</div>

View File

@ -2,7 +2,7 @@
<div class="article-category">
<%- list_categories(post.categories, {
show_count: false,
class: 'article-category',
class: 'p-category article-category',
style: 'none',
separator: '/'
}) %>

View File

@ -1,6 +1,6 @@
<%/* Date format is specified to skip timezone conversion */%>
<% if (is_post()) { %>
<time class="published" datetime="<%= date(post.date, 'YYYY-MM-DD[T00:00:00.000Z]') %>" itemprop="datePublished"><%= date(post.date, 'D MMM YYYY') %></time>
<time class="dt-published" datetime="<%= date(post.date, 'YYYY-MM-DD[T00:00:00.000Z]') %>" itemprop="datePublished"><%= date(post.date, 'D MMM YYYY') %></time>
<% } else { %>
<time datetime="<%= date(post.date, 'YYYY-MM-DD[T00:00:00.000Z]') %>" itemprop="datePublished"><%= date(post.date, 'D MMM YYYY') %></time>
<% } %>

View File

@ -1,7 +1,7 @@
<% if (post.tags && post.tags.length) { %>
<%- listTags(post.tags, {
show_count: false,
class: 'article-tag',
class: 'p-category article-tag',
transform: titlecase
}) %>
<% } %>

View File

@ -1,3 +1,3 @@
<%/* User-specified updated date */%>
<%/* default post.updated is (almost) always is the time 'hexo generate' is executed */%>
<time class="updated" datetime="<%= date(post.lastUpdated, 'YYYY-MM-DD[T00:00:00.000Z]') %>" itemprop="dateModified"><%= date(post.lastUpdated, 'D MMM YYYY') %></time>
<time class="dt-updated" datetime="<%= date(post.lastUpdated, 'YYYY-MM-DD[T00:00:00.000Z]') %>" itemprop="dateModified"><%= date(post.lastUpdated, 'D MMM YYYY') %></time>