diff --git a/layout/_partial/article.ejs b/layout/_partial/article.ejs
index a01288d..e512a50 100755
--- a/layout/_partial/article.ejs
+++ b/layout/_partial/article.ejs
@@ -4,11 +4,11 @@
<% if(post.title){ %>
<%= post.title %>
<% } else if (post.date) { %>
- <%= date(post.date, 'YYYY-MM-DD dddd') %>
+ <%= date(post.date, config.date_format) %>
<% } %>
<%- partial('categories',{post:post}) %>
@@ -20,7 +20,7 @@
<%- post.content %>
- <% if (post.tags && post.tags.length) { %>
+ <% if (post.tags && post.tags && post.tags.each) { %>
<% post.tags.each(function(item){ %>
<%=item.name %>
@@ -36,7 +36,11 @@
上一篇
<% if (post.prev.tags && post.prev.tags.length) { %>
@@ -55,7 +59,11 @@
下一篇
<% if (post.next.tags && post.next.tags.length) { %>
diff --git a/layout/_partial/categories.ejs b/layout/_partial/categories.ejs
index 741bbfe..e8c31fa 100755
--- a/layout/_partial/categories.ejs
+++ b/layout/_partial/categories.ejs
@@ -1,4 +1,4 @@
-<% if (post.categories && post.categories.length){ %>
+<% if (post.categories && post.categories && post.categories.forEach){ %>
<%
var cats = [];
post.categories.forEach(function(cat){
diff --git a/layout/_partial/post.ejs b/layout/_partial/post.ejs
index f411add..e3d65a0 100755
--- a/layout/_partial/post.ejs
+++ b/layout/_partial/post.ejs
@@ -5,12 +5,12 @@
<% if(post.title){ %>
<%= post.title %>
<% } else if (post.date) { %>
- <%= date(post.date, 'YYYY-MM-DD dddd') %>
+ <%= date(post.date, config.date_format) %>
<% } %>
<%- partial('categories',{post:post}) %>
diff --git a/layout/archive.ejs b/layout/archive.ejs
index e7ef7de..e108569 100755
--- a/layout/archive.ejs
+++ b/layout/archive.ejs
@@ -20,7 +20,13 @@
<% }); %>