npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

xvaline

v0.0.6

Published

comment system with spam checking and review, based on Valine.

Downloads

63

Readme

XValine

简介

又一个基于 Valine 开发的支持先审核后显示、关键词屏蔽的评论系统。后端同时兼容默认的 leancloudValine-admin 部署。

项目链接

Why XValine

支持审核后显示、关键词屏蔽。对于中国大陆注册的网站,如果有评论、留言等功能,根据公安备案的相关要求,需要实现先审核后显示关键词屏蔽的功能

无后端实现。我的博客是 Hugo 搭建的静态网站,很适合与 Valine 这类只需要简单配置,而无需后端实现的评论系统搭配使用。

此外,参考了 NeoValine:一个基于 Valine 开发的支持人工审核的评论系统 这篇文章中对目前常见几款评论系统的对比。结合上述两点核心诉求,于是就有了 XValine

特点

  • 默认开启关键词屏蔽(昵称、评论内容)
  • 默认开启先审核后显示
  • 无后端实现,后端同时兼容默认的 leancloudValine-admin
  • 免费开源无广告(GPL-2.0 License)
  • 基于 Valine 二次开发,快速、简洁、高效

快速开始

为了便于 Valine 用户使用,安装方式尽量与其保持一致。

同时,默认开启先审核后显示关键词屏蔽功能,方便使用。Hugo 用户也无需修改 layoutconfig.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
})

关键词屏蔽

设置关键词屏蔽后,用户提交评论时,如果包含屏蔽词,则会弹层告知内容中含有某某屏蔽词,可以一定程度上减少垃圾信息。

  • 支持自定义屏蔽词列表

image


/**
 * 关键词屏蔽配置
 * 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
})

先审核后显示

同时兼容默认的 leancloudValine-admin 部署方式。

设置 requireReview:true 后,未审核通过的评论在前端展示时会显示为该评论需要审核后才可以显示哦~ ヾ(๑╹◡╹)ノ"

  • 使用默认 leancloud。在 LeanCloud 后台将评论 isSpam 属性改为 false,审核通过该评论。(感谢alwxkxk 的启发)
  • 使用 Valine-admin。常规操作即可。

image

/**
 * 先审核后显示,默认开启
 * 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

介绍

Valine 文档 快速开始

version npm downloads build

Valine 诞生于2017年8月7日,是一款基于LeanCloud的快速、简洁且高效的无后端评论系统。

理论上支持但不限于静态博客,目前已有HexoJekyllTypechoHugoGhost 等博客程序在使用Valine。

特性

License

GPL-2.0