From d442c21ef2ab6cb6932128be22fdc995400dc02b Mon Sep 17 00:00:00 2001 From: monniya Date: Sun, 3 Jul 2016 13:18:01 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=AF=84=E8=AE=BA=EF=BC=8Cde?= =?UTF-8?q?scription=E9=80=89=E5=A1=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- layout/_partial/head.ejs | 6 ++++-- layout/index.ejs | 2 +- layout/layout.ejs | 4 +++- layout/post.ejs | 3 +-- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/layout/_partial/head.ejs b/layout/_partial/head.ejs index cdae339..2282a10 100644 --- a/layout/_partial/head.ejs +++ b/layout/_partial/head.ejs @@ -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); diff --git a/layout/index.ejs b/layout/index.ejs index c70aa8c..2b24404 100644 --- a/layout/index.ejs +++ b/layout/index.ejs @@ -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)%> <% } %>…

<%- partial('_partial/date',{post: post}) %> • 于 <%- partial('_partial/tags',{post: post}) %>继续阅读
diff --git a/layout/layout.ejs b/layout/layout.ejs index ee30c6b..f5c5be7 100644 --- a/layout/layout.ejs +++ b/layout/layout.ejs @@ -12,7 +12,7 @@
<%- body %> - + <%- partial('_partial/comments',{}) %> <%- partial('_partial/footer', {}) %>
@@ -22,6 +22,8 @@ <%- partial('_partial/google_analytics') %> <%- partial('_partial/baidu_tongji') %> + diff --git a/layout/post.ejs b/layout/post.ejs index d9a73a1..8d3c2f3 100644 --- a/layout/post.ejs +++ b/layout/post.ejs @@ -3,7 +3,7 @@