Skip to content

Commit

Permalink
✨ Feature: add waline support (#331)
Browse files Browse the repository at this point in the history
* Add waline support

* add avatar config for waline
  • Loading branch information
zhullyb committed Sep 22, 2021
1 parent 9c30e08 commit d51ac1e
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 1 deletion.
7 changes: 7 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,13 @@ disqus:
# perPage: 10 # How much comment/page
# labels: 'Vssue'

# waline comment system. https://waline.js.org/
# waline:
# enable: true
# serverURL: ''
# lang: zh-CN
# avatar: ''

# Footer Settings
# ---------------
since: 2013
Expand Down
4 changes: 3 additions & 1 deletion layout/includes/comments/index.pug
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,6 @@ else if theme.gitalk && theme.gitalk.enable
else if theme.valine && theme.valine.enable
include ./valine.pug
else if theme.vssue && theme.vssue.enable
include ./vssue.pug
include ./vssue.pug
else if theme.waline && theme.waline.enable
include ./waline.pug
10 changes: 10 additions & 0 deletions layout/includes/comments/waline.pug
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
if theme.waline && theme.waline.enable
#waline
script(src='https://cdn.jsdelivr.net/npm/@waline/client')
script.
Waline({
el:'#waline',
serverURL: '#{theme.waline.serverURL}',
lang: '#{theme.waline.lang}'
avatar: '#{theme.waline.avatar}'
})

0 comments on commit d51ac1e

Please sign in to comment.