MiniValine is a simple and minimalist comment system based on Leancloud
- High speed.
- Safe by default.
Front-end verification is all floating clouds. - Easy to customize.
No server-side implementation.- Always compatible with IE.
- Simple and lightweight (11.72 KB gzipped).
- Support lazy loading picture emoji.
- Support code highlighting.
- Support Markdown.
- Support MathJax.
- Enter live preview.
- Support paste and upload pictures.
- Support multiple languages.
Two ways.
- links
<script src="https://unpkg.com/minivaline/dist/MiniValine.min.js"></script>
<!-- or -->
<script src="https://cdn.jsdelivr.net/npm/minivaline/dist/MiniValine.min.js"></script>
<!-- or -->
<script src="https://cdn.jsdelivr.net/gh/MiniValine/MiniValine/dist/MiniValine.min.js"></script>
- npm install
# Install minivaline
npm install minivaline --save
// Use import
import MiniValine from 'minivaline';
// or Use require
const MiniValine = require('minivaline');
new MiniValine({
el:'#vcomments',
// other config
})
Get App ID
/App Key
from LeanCloud
Click here to register or login in LeanCloud
.
Click here Create new application in LeanCloud
, and you will get appId
/appKey
.
<!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>MiniValine - A simple comment system based on Leancloud.</title>
<!--Load js and insert it before </ body>-->
<script src="https://unpkg.com/minivaline/dist/MiniValine.min.js"></script>
</head>
<body>
<div class="comment"></div>
<script>
new MiniValine({
el: '.comment',
appId: 'Your App ID',
appKey: 'Your Key',
placeholder: 'Write a Comment O(∩_∩)O~~'
});
</script>
</body>
</html>
-
el
String
Required. [object HTMLDivElement]
-
appId
String
Required. Your App ID
-
appKey
String
Required. Your App Key
-
placeholder
String
Input Placeholder
-
pathname
String
Default:
location.pathname.replace(/\/$/, '')
The pathname of the page.
-
adminEmailMd5
String
The MD5 of Admin Email to show Admin Flag.
-
math
Boolean
orNumber
Default:
true
Options:
false
or0
Close MathJax.true
or1
Support MathJax@2 initialization.2
Support MathJax@2 initialization.3
Support MathJax@3 initialization.
The above is the initialization operation of integrating MathJax in MiniValine. If MathJax is loaded on the page, MiniValine will use the MathJax version on the page.
-
md
Boolean
Default:
true
Support Markdown.
-
lang
String
Default:
navigator.language || navigator.userLanguage
.Localization language key, en and zh-CN are currently available.
More i18n info: minivaline-i18n
-
emoticonUrl
String
Default:
'https://cdn.jsdelivr.net/npm/alus'
Expression Url.
-
maxNest
Number
Default:
3
Nest size.
-
pageSize
Number
Default:
6
Pagination size.
-
serverURLs
String
Default:
http[s]://[tab/us].avoscloud.com
This configuration is suitable for domestic custom domain name users, the overseas version will be automatically detected (no need to fill in manually).
-
Extraction from the core library to reduce volume.
-
Project engineering
-
Component modularity
-
And more.
- Visit the AWESOME MiniValine list to share plugins and tutorials with other users.
- Report a bug in GitHub Issues.
- Add or improve translation in few seconds.
- Request a new feature on GitHub.
- Join our Gitter chats.
- Vote for popular feature requests.
We welcome you to join the development of MiniValine. Please see contributing document. 🤗
Also, we welcome Issue or PR to MiniValine.