Skip to content

marinesky/Valine

 
 

Repository files navigation

Valine version npm downloads build donate

A simple comment system based on Leancloud.


Live Demo

中文教程

  • High speed.
  • Safe by default.
  • Easy to customize.
  • Support mail notifier.
  • Support validation code.
  • No server-side implementation.
  • Support part of the markdown syntax.

Table of content

Installation

1. Installation

⚠️ You must first reference the package AV in the web page
<script src="//cdn1.lncld.net/static/js/3.0.4/av-min.js"></script>

<script src="./dist/Valine.min.js"></script>

or

<script src="https://xcss.github.io/Valine/dist/Valine.min.js"></script>

or via npm

npm install valine --save
import Valine from 'valine'

2. Get appId/appKey from Leancloud
Click here to register or login in leancloud.
Click here Create new application in Leancloud, and you will get appId/appKey.

Useage

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Valine - A simple comment system based on Leancloud.</title>
    <script src="//cdn1.lncld.net/static/js/3.0.4/av-min.js"></script>
    <script src="./dist/Valine.min.js"></script>
</head>
<body>
    <div class="comment"></div>
    <script>
        new Valine({
            av: AV, // source from av-min.js
            el: '.comment' ,
<<<<<<< HEAD
            notify:true, // 邮件提醒 v1.1.4新增
            verify:true, // 验证码 v1.1.4新增
=======
            notify: true, // 邮件提醒 v1.1.4新增
            verify: true, // 验证码 v1.1.4新增
>>>>>>> dev
            app_id: 'your appid',
            app_key: 'your appkey',
            placeholder: 'ヾノ≧∀≦)o来啊,快活啊!'
        });
    </script>
</body>
</html>

Contributors

Features

  • Support for full markdown syntax
  • Syntax highlighting
  • And more...

Donate

If you are enjoying this app, please consider making a donation to keep it alive, I will try my best to dedicate more time or even full time to work on it. 😉

If you are not available for this, simply spreading the word for us would help too!

License

GPL-2.0

About

A simple comment system based on Leancloud.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 66.7%
  • CSS 18.7%
  • HTML 14.6%