waline-notification-lark-group-bot
v1.0.3
Published
A Waline notification plugin that sends alerts via lark group bot
Maintainers
Readme
waline-notification-lark-group-bot
A Waline plugin that provide lark group bot notification spport.
中文文档 | English Doc
How to install
npm install waline-notification-lark-group-botHow to use
Edit your Waline File:
index.js
const Application = require('@waline/vercel');
const LarkGroupBot = require('waline-notification-lark-group-bot');
module.exports = Application({
plugins: [LarkGroupBot],
async postSave(comment) {
// do what ever you want after comment saved
},
});package.json
Add "waline-notification-lark-group-bot": "latest" into package.json dependencies.
Environment Variables
LARK_GROUP_WEBHOOK: Lark group bot webhook URL. e.g.https://open.larksuite.com/open-apis/bot/v2/hook/b55f4f3c-478c-4256-8ba9-cf217f288987SITE_NAME: Your site name, used for display in notification message.SITE_URL: Your site URL, used for display in notification message.BARK_TITLE_TEMPLATE: (optional) Title template. The default value is{{self.name}} 有新评论啦, which is used to display the title in the notification message.LARK_TEMPLATE: (optional) Your custom notification template, please refer this document.
The default template is as follow:
【昵称】:{{self.nick}}
【邮箱】:{{self.mail}}
【内容】:{{self.comment}}
【地址】:{{site.postUrl}}You need redeploy after change environment variables.
