Skip to content

Commit

Permalink
feat(waline): add support for Waline emojis in comments #266
Browse files Browse the repository at this point in the history
  • Loading branch information
EvanNotFound committed Dec 8, 2023
1 parent 986b8e3 commit 62ce10b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,7 @@ comment:
waline:
serverUrl: https://example.example.com # Waline server URL. e.g. https://example.example.com
lang: zh-CN # Waline language. e.g. zh-CN, en-US. See https://waline.js.org/guide/client/i18n.html
emoji: [] # Waline emojis, see https://waline.js.org/guide/features/emoji.html
# Gitalk comment system. See https://github.com/gitalk/gitalk
gitalk:
clientID: # GitHub Application Client ID
Expand Down
6 changes: 5 additions & 1 deletion layout/_partials/comments/waline.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@
serverURL: '<%= theme.comment.config.waline.serverUrl %>',
lang: '<%= theme.comment.config.waline.lang %>',
dark: 'body[class~="dark-mode"]',
requiredMeta: ['nick', 'mail']
requiredMeta: ['nick', 'mail'],
emoji: [<%- theme.comment.config.waline.emoji && theme.comment.config.waline.emoji.map(
(item) => `'${item}'`
).join(','
) %>],
});
}
Expand Down

0 comments on commit 62ce10b

Please sign in to comment.