Skip to content

Commit

Permalink
修改评论,description选填
Browse files Browse the repository at this point in the history
  • Loading branch information
monniya committed Jul 3, 2016
1 parent 3af6304 commit d442c21
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
6 changes: 4 additions & 2 deletions layout/_partial/head.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@
<%
var title = page.title;
title = title ? (title + ' | ' + config.title) : (config.subtitle ? config.title + " | " + config.subtitle : config.title);
var description = page.description || theme.description || config.description;
var description = "";
if (page.description || theme.description || config.description) {
description = page.description || theme.description || config.description;
}
if (!description) {
if (page.excerpt) {
description = strip_html(page.excerpt);
Expand Down
2 changes: 1 addition & 1 deletion layout/index.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<% if (post.excerpt){ %>
<%= strip_html(post.excerpt) %>
<% } else { %>
<%= strip_html(post.content).substring(0, 250)%>
<%= strip_html(post.content).substring(0, 200)%>
<% } %>&hellip;
</p>
<div class="post-list__meta"><%- partial('_partial/date',{post: post}) %> &#8226; <span class="post-list__meta--tags tags">&nbsp;<%- partial('_partial/tags',{post: post}) %></span><a class="btn-border-small" href="<%- config.root %><%- link%>">继续阅读</a></div>
Expand Down
4 changes: 3 additions & 1 deletion layout/layout.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<div class="content-wrapper">
<div class="content-wrapper__inner">
<%- body %>

<%- partial('_partial/comments',{}) %>
<%- partial('_partial/footer', {}) %>
</div>
</div>
Expand All @@ -22,6 +22,8 @@
<%- partial('_partial/google_analytics') %>
<%- partial('_partial/baidu_tongji') %>
<script async src="https://dn-lbstatics.qbox.me/busuanzi/2.3/busuanzi.pure.mini.js">
</script>

</body>
</html>
3 changes: 1 addition & 2 deletions layout/post.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<header class="post-header">
<div class="post-meta">
<%- partial('_partial/date',{post: page}) %> &#8226; <span class="post-meta__tags tags">于&nbsp;<%- partial('_partial/tags',{post: page}) %> </span>
<span class="page-pv">
<span class="page-pv">
&nbsp;阅读&nbsp;<span id="busuanzi_value_page_pv"><i class="fa fa-spinner fa-spin"></i></span>
</span>

Expand All @@ -17,4 +17,3 @@

</article>
<%- partial('_partial/read-more', {}) %>
<%- partial('_partial/comments',{post: page}) %>

0 comments on commit d442c21

Please sign in to comment.