
Research
/Security News
Mini Shai-Hulud Campaign Hits Red Hat Cloud Services npm Packages
A mini Shai-Hulud campaign compromised Red Hat Cloud Services npm packages to steal developer and CI/CD secrets during installation.
又一个基于 Valine 开发的支持先审核后显示、关键词屏蔽的评论系统。后端同时兼容默认的 leancloud 或 Valine-admin 部署。
支持审核后显示、关键词屏蔽。对于中国大陆注册的网站,如果有评论、留言等功能,根据公安备案的相关要求,需要实现先审核后显示、关键词屏蔽的功能
无后端实现。我的博客是 Hugo 搭建的静态网站,很适合与 Valine 这类只需要简单配置,而无需后端实现的评论系统搭配使用。
此外,参考了 NeoValine:一个基于 Valine 开发的支持人工审核的评论系统
这篇文章中对目前常见几款评论系统的对比。结合上述两点核心诉求,于是就有了 XValine。
leancloud 或 Valine-admin为了便于 Valine 用户使用,安装方式尽量与其保持一致。
同时,默认开启先审核后显示、关键词屏蔽功能,方便使用。Hugo 用户也无需修改 layout、config.toml 配置。
// 使用 npm
npm install xvaline --save
// 使用 cdn 加载最新版本 XValine
<script src='https://cdn.jsdelivr.net/npm/xvaline@latest/dist/Valine.min.js'></script>
// Use import
import Valine from 'xvaline';
// or Use require
const Valine = require('xvaline');
new Valine({
// 页面中 <div id="vcomments"></div>
el:'#vcomments',
// 配置 Leancloud or Valine-Admin 的 app 信息
appId: 'Your appId',
appKey: 'Your appKey',
// other config
})
设置关键词屏蔽后,用户提交评论时,如果包含屏蔽词,则会弹层告知内容中含有某某屏蔽词,可以一定程度上减少垃圾信息。

/**
* 关键词屏蔽配置
* banKeywords: "default" | url | undefined
* 默认开启,参数 "default"
*/
new Valine({
el:'#vcomments',
// 配置 Leancloud or Valine-Admin 的 app 信息
appId: 'Your appId',
appKey: 'Your appKey',
// 默认开启,加载默认关键词配置
banKeywords: "default",
// 手动指定关键词地址,json 格式,{"code": 200, "data": ["关键词1","关键词2"]}
// banKeywords: "https://yourconfigurl.json",
// 或者不填该字段,不屏蔽关键词
// other config
})
同时兼容默认的 leancloud 或 Valine-admin 部署方式。
设置 requireReview:true 后,未审核通过的评论在前端展示时会显示为该评论需要审核后才可以显示哦~ ヾ(๑╹◡╹)ノ"。
leancloud。在 LeanCloud 后台将评论 isSpam 属性改为 false,审核通过该评论。(感谢alwxkxk 的启发)Valine-admin。常规操作即可。
/**
* 先审核后显示,默认开启
* requireReview: boolean 是否需要人工审核,默认为 true
*/
new Valine({
// 页面中 <div id="vcomments"></div>
el:'#vcomments',
// 配置 Leancloud or Valine-Admin 的 app 信息
appId: 'Your appId',
appKey: 'Your appKey',
// 设置为需要人工审核
requireReview: true,
// 推荐加上友情提示语,防止访客发完评价后看不见提bug……
placeholder: "评论在后台人工审核后可见~"
})
当前稳定版本 v 0.0.6, 查看更新日志
Valine 诞生于2017年8月7日,是一款基于LeanCloud的快速、简洁且高效的无后端评论系统。
理论上支持但不限于静态博客,目前已有Hexo、Jekyll、Typecho、Hugo、Ghost 等博客程序在使用Valine。
v1.2.0+FAQs
comment system with spam checking and review, based on Valine.
We found that xvaline demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
/Security News
A mini Shai-Hulud campaign compromised Red Hat Cloud Services npm packages to steal developer and CI/CD secrets during installation.

Research
/Security News
The North Korean malware loader hides in a Packagist-listed package and its GitHub branch to fetch and execute remote code in a likely Contagious Interview-style lure.

Security News
The Rust project is moving toward formal rules on LLM use in contributions after months of internal debate over maintainer burden, code quality, and contributor experience.