diff --git a/layout/common/article-meta-info.ejs b/layout/common/article-meta-info.ejs new file mode 100644 index 0000000..c205b67 --- /dev/null +++ b/layout/common/article-meta-info.ejs @@ -0,0 +1,34 @@ +
+ + + <%= date(articleData.date, 'YYYY-MM-DD HH:MM:SS') %> + + + + <% if (articleData.categories.length) { %> + + + + + <% } %> + + + <% if (articleData.tags.length) { %> + + + + + <% } %> +
\ No newline at end of file diff --git a/layout/common/article-post.ejs b/layout/common/article-post.ejs index 23ae432..4e05b69 100644 --- a/layout/common/article-post.ejs +++ b/layout/common/article-post.ejs @@ -1,34 +1,18 @@ <% if (is_post()) { %> +

<%= page.title %>

+
-
-
- - - <%- date(page.date, 'YYYY-MM-DD') %> - - - - <% page.categories.forEach(category => { %> - <%= category.name %> - <% }) %> - - - <% page.tags.forEach(tag => { %> - - <% }) %> - -
-
+ <%- partial('article-meta-info', {articleData: page, index: true}) %>
+
<%- page.content %>
-
<% if (page.prev) { %>
diff --git a/layout/common/home-post.ejs b/layout/common/home-post.ejs index 7dc67f6..d77a059 100644 --- a/layout/common/home-post.ejs +++ b/layout/common/home-post.ejs @@ -15,42 +15,8 @@ <%- truncate(strip_html(post.content), {length: 80}) %>
- -