Skip to content

Commit

Permalink
Merge pull request fi3ework#319 from zhullyb/dev
Browse files Browse the repository at this point in the history
Add waline support
  • Loading branch information
LolipopJ committed Oct 25, 2021
2 parents e96ca99 + a6595e3 commit baf87c3
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 0 deletions.
5 changes: 5 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,11 @@ comment:
valine_appId:
valine_appKey:
valine_placeHolder:
# Waline site: https://waline.js.org/
waline_serverURL:
waline_placeHolder:
waline_avatar:
waline_login:
# gitalk site: https://github.com/gitalk/gitalk/
# Value 'true' is recommended for gitalk_pathname_id setting
gitalk_client_id:
Expand Down
13 changes: 13 additions & 0 deletions layout/_partial/comment/waline.ejs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<% if(theme.comment && theme.comment.waline_serverURL) { %>
<script src="//cdn.jsdelivr.net/npm/@waline/client"></script>
<div id="comment"></div>
<script>
Waline({
el: '#comment' ,
serverURL: "<%- theme.comment.waline_serverURL %>",
placeholder: "<%- theme.comment.waline_placeHolder %>",
avatar: "<%- theme.comment.waline_avatar %>",
login: "<%- theme.comment.waline_login %>"
});
</script>
<% } %>
1 change: 1 addition & 0 deletions layout/post.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
<%- partial('_partial/comment/youyan') %>
<%- partial('_partial/comment/custom') %>
<%- partial('_partial/comment/valine') %>
<%- partial('_partial/comment/waline') %>
</div>
<% } %>
<!-- timeliness note -->
Expand Down

0 comments on commit baf87c3

Please sign in to comment.