2020-03-18 23:14:09 +08:00
|
|
|
<!-- is_post() 检查当前页面是否为文章 -->
|
|
|
|
<% if (is_post()) { %>
|
|
|
|
<div class="post">
|
|
|
|
<div class="post-title">
|
|
|
|
<h3><a><%= page.title %></a></h3>
|
|
|
|
</div>
|
2020-03-19 14:51:48 +08:00
|
|
|
<div class="post-meta-info">
|
2020-03-18 23:14:09 +08:00
|
|
|
<div class="meta">
|
|
|
|
<div class="info">
|
|
|
|
<span>
|
|
|
|
<i class="fa fa-calendar"></i>
|
|
|
|
<span class="date"><%- date(page.date, 'YYYY-MM-DD') %></span>
|
|
|
|
</span>
|
|
|
|
<span>
|
|
|
|
<i class="fa fa-list"></i>
|
|
|
|
<% page.categories.forEach(category => { %>
|
|
|
|
<a href="<%- url_for(category.path) %>" rel="tag"><%= category.name %></a>
|
|
|
|
<% }) %>
|
|
|
|
</span>
|
|
|
|
<span>
|
|
|
|
<% page.tags.forEach(tag => { %>
|
|
|
|
<a href="<%- url_for(tag.path) %>" rel="tag">#<%= tag.name %></a>
|
|
|
|
<% }) %>
|
|
|
|
</span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2020-03-19 14:51:48 +08:00
|
|
|
<div class="post-content">
|
|
|
|
<%- page.content %>
|
|
|
|
</div>
|
2020-03-18 23:14:09 +08:00
|
|
|
<div class="comment-container">
|
|
|
|
<%- partial('valine') %>
|
|
|
|
</div>
|
2020-03-15 15:45:38 +08:00
|
|
|
</div>
|
|
|
|
|
2020-03-18 23:14:09 +08:00
|
|
|
<% } %>
|