The date of EOL: 2020.09.01 | CHANGELOG
MiniValine is a simple and minimalist comment system based on Leancloud
- High speed.
- Easy to customize.
- Safe by default.
- Always compatible with IE.
- Simple and lightweight.
- Lazy loading picture emoji.
- Emoticon category.
- Code highlighting.
- Markdown.
- MathJax.
- Enter live preview.
- Upload pictures pasting or dragging.
- Multiple languages.
- Integrated xCss and DesertsP Style mode.
- Admin Flag.
- Browser and Operating System icon.
- Comment barrage.
Two ways.
- links
<script src="https://unpkg.com/minivaline@3/dist/MiniValine.min.js"></script>
<!-- or -->
<script src="https://cdn.jsdelivr.net/npm/minivaline@3/dist/MiniValine.min.js"></script>
<!-- or -->
<script src="https://cdn.jsdelivr.net/gh/MiniValine/MiniValine@3/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="mvcomment"></div>
<script>
new MiniValine({
el: '.mvcomment',
appId: 'Your App ID',
appKey: 'Your Key',
placeholder: 'Write a Comment O(∩_∩)O~~'
});
</script>
</body>
</html><!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>
</head>
<body>
<div class="mvcomment"></div>
<script>
function load_minivaline() {
setTimeout(function() {
var HEAD = document.getElementsByTagName('head')[0] || document.documentElement;
var src = 'https://cdn.jsdelivr.net/npm/minivaline@3/dist/MiniValine.min.js'
var script = document.createElement('script')
script.setAttribute('type','text/javascript')
script.onload = function() {
pjax_minivaline()
}
script.setAttribute('src', src)
HEAD.appendChild(script)
}, 1);
};
function pjax_minivaline() {
if(!document.querySelectorAll(".mvcomment")[0])return;
new MiniValine({
el: '.mvcomment',
appId: 'Your App ID',
appKey: 'Your Key',
placeholder: 'Write a Comment O(∩_∩)O~~'
});
}
load_minivaline();
document.addEventListener('pjax:complete', function () {
pjax_minivaline();
});
</script>
</body>
</html>-
el
StringRequired. [object HTMLDivElement]
-
appId
StringRequired. Your App ID
-
appKey
StringRequired. Your App Key
-
placeholder
StringInput Placeholder
-
pathname
StringDefault:
location.pathnameThe pathname of the page.
-
math
BooleanDefault:
trueOptions:
falseClose MathJax.trueSupport 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.
-
dark
BooleanDefault:
falseDark model.
-
lang
StringDefault:
navigator.language || navigator.userLanguage.Localization language key, en and zh-CN are currently available.
More i18n info: minivaline-i18n
-
emoticonUrl
String ArrayDefault:
['https://cdn.jsdelivr.net/npm/alus@latest','https://cdn.jsdelivr.net/gh/MiniValine/qq@latest','https://cdn.jsdelivr.net/gh/MiniValine/Bilibilis@latest','https://cdn.jsdelivr.net/gh/MiniValine/tieba@latest','https://cdn.jsdelivr.net/gh/MiniValine/twemoji@latest','https://cdn.jsdelivr.net/gh/MiniValine/weibo@latest']Expression Url.
-
NoRecordIP
BooleanDefault:
falseDo not record commenter IP.
-
maxNest
NumberDefault:
6Sub-comment maximum nesting depth.
-
pageSize
NumberDefault:
6Pagination size.
-
enableQQ
BooleanDefault:
falseEnable QQ avatar API.
-
visitor
BooleanDefault:
trueOnly
article reading access statisticsandwhole site access statisticsare provided. For other functions, please set it to "false" and configureMiniValine Counterby yourself. -
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).
-
barrager
NumberDefault:
1Options:
0Close Comment barrage.1Load a round of Comment barrage.2Load all round of Comment barrage
Comment barrage. [Load only when the page is first loaded]
-
role
StringDefault:
adminWrite permissions for the administrator role.
-
mode
StringDefault:
DesertsPOptions:
DesertsPDesertsP Style mode.xCssxCss Style mode.
-
adminEmailMd5
StringThe MD5 of Admin Email to show Admin Flag.
-
closeFlag
BooleanDefault:
falseTurn off visitor flag.
-
master
String ArrayDefault:
[]The MD5 String Array of master Email to show master Flag.
-
friends
String ArrayDefault:
[]The MD5 String Array of friends Email to show friends Flag.
-
tagMeta
String ArrayDefault:
[]The String Array of Words to show Flag (only three).
For Example:
tagMeta: ["Master", "Friend", "Visitor"]
-
cloudflag
BooleanDefault:
falseIf
cloudflagis turned on, the setting ofVisitor Flag Local Optionsis invalid.
-
region
BooleanDefault:
falseAccording to IP output area.
Note: Currently only Chinese API is available. NoRecordIP:
false. -
closeUA
BooleanDefault:
falseTurn off UA detection.
-
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.
- This project is always open source and free(freedom).
- This project does not have any competitive relationship with any other project.
- This project is a collection of inspiration from the Valine family. Thanks to every developer for their inspiration and contribution.
- The project is open source only for sharing, developers are not obliged to provide after-sales service.
We welcome you to join the development of MiniValine. Please see contributing document. 🤗
Also, we welcome Issue or PR to MiniValine.
This project exists thanks to all the people who contribute.
Tribute to excellent open source! Tribute to excellent sharers!










