feat: share button enable

This commit is contained in:
shenyu 2020-02-03 11:40:27 +08:00
parent 4c7e107c08
commit ed5e4803d1
2 changed files with 6 additions and 1 deletions

View File

@ -38,8 +38,12 @@ progressBar: ture
# 文章配置 # 文章配置
# 文章太长,截断按钮文字(在需要截断的行增加此标记:<!--more-->) # 文章太长,截断按钮文字(在需要截断的行增加此标记:<!--more-->)
excerpt_link: 阅读更多... excerpt_link: 阅读更多...
# 是否开启文章分享按钮
share_enable: true
# 文章分享文字 # 文章分享文字
share_text: 分享 share_text: 分享
# 分页文字 # 分页文字
nav_text: nav_text:
page_prev: 上一页 page_prev: 上一页

View File

@ -41,8 +41,9 @@
<% } %> <% } %>
</div> </div>
<footer class="article-footer"> <footer class="article-footer">
<a data-url="<%- post.permalink %>" data-id="<%= post._id %>" <% if (theme.share_enable){ %><a data-url="<%- post.permalink %>" data-id="<%= post._id %>"
class="article-share-link"><%- theme.share_text %></a> class="article-share-link"><%- theme.share_text %></a>
<% } %>
<%- partial('post/tag') %> <%- partial('post/tag') %>
</footer> </footer>