diff --git a/README.md b/README.md index 25a30fd..5753c1b 100644 --- a/README.md +++ b/README.md @@ -103,6 +103,7 @@ progressBar: ture # Article Setting # (Use this to excerpt if article is too long:) excerpt_link: Read More... +excerpt_all: false # Share share_enable: true @@ -146,6 +147,7 @@ weixin: /images/wechat.jpg copyright_type: 2 # Search +# https://github.com/theme-next/hexo-generator-searchdb search: true # RSS diff --git a/_config.yml b/_config.yml index b0dea70..5dd1508 100644 --- a/_config.yml +++ b/_config.yml @@ -38,6 +38,8 @@ progressBar: ture # 文章配置 # 文章太长,截断按钮文字(在需要截断的行增加此标记:) excerpt_link: 阅读更多... +# 如果你嫌每篇文章手动加more标记比较麻烦,又不想在首页全文显示,可以把excerpt_all设置成true,这样首页只会显示文章归档 +excerpt_all: false # 是否开启文章分享按钮 share_enable: true @@ -82,6 +84,7 @@ weixin: /images/wechat.jpg copyright_type: 2 # 是否启用搜索 +# 需要安装hexo-generator-searchdb(https://github.com/theme-next/hexo-generator-searchdb) search: true # RSS订阅(先安装hexo-generator-feed插件,再去博客根目录config进行配置) diff --git a/layout/_partial/article.ejs b/layout/_partial/article.ejs index 770a4db..b3eceab 100644 --- a/layout/_partial/article.ejs +++ b/layout/_partial/article.ejs @@ -22,6 +22,7 @@ <%- partial('post/tocbot') %> <% } %> + <% if (!theme.excerpt_all){ %>
<%- partial('post/justifiedGallery') %> <%- partial('post/gallery') %> @@ -40,6 +41,8 @@
<% } %> + + <% } %> <% if (((theme.copyright_type === 2) || (theme.copyright_type === 1 && post.copyright)) && !index){ %>
diff --git a/source/css/_partial/articles.styl b/source/css/_partial/articles.styl index 175a8b7..8f2dedc 100644 --- a/source/css/_partial/articles.styl +++ b/source/css/_partial/articles.styl @@ -3,10 +3,8 @@ padding 4.5rem 0 &:not(:last-child) border-bottom border-width #ddd solid - .article-entry, .article-footer - margin-top 0 .article-entry - margin 1rem 0 + margin-top 1rem padding 0 2rem 2rem border 1px dashed lighten(tag-color,80%) .article-more-link @@ -18,4 +16,6 @@ color white !important text-decoration none .article-gallery - margin-top 1.5rem \ No newline at end of file + margin-top 1.5rem + .article-footer + margin-top 1rem