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
StringRequired. [object HTMLDivElement]
-
appId
StringRequired. Your App ID
-
appKey
StringRequired. Your App Key
-
placeholder
StringInput Placeholder
-
pathname
StringDefault:
location.pathname.replace(/\/$/, '')The pathname of the page.
-
adminEmailMd5
StringThe MD5 of Admin Email to show Admin Flag.
-
math
BooleanorNumberDefault:
trueOptions:
falseor0Close MathJax.trueor1Support MathJax@2 initialization.2Support MathJax@2 initialization.3Support 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
BooleanDefault:
trueSupport Markdown.
-
lang
StringDefault:
navigator.language || navigator.userLanguage.Localization language key, en and zh-CN are currently available.
More i18n info: minivaline-i18n
-
emoticonUrl
StringDefault:
'https://cdn.jsdelivr.net/npm/alus'Expression Url.
-
maxNest
NumberDefault:
3Nest size.
-
pageSize
NumberDefault:
6Pagination size.
-
serverURLs
StringDefault:
http[s]://[tab/us].avoscloud.comThis 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.











