Skip to content

About

A simple and minimalist comment system.

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

 
 

Repository files navigation

This is MiniValine version 4.x

The date of EOL: 2020.12.20


version NPM GPL Licence npm downloads gzip-size FOSSA Status

Build Status Build Status Mergify Status codecov Codacy Badge DeepScan grade

MiniValine is a simple and minimalist comment system based on Leancloud


Demo | Docs | FAQs | Awesome | CHANGELOG

Features

Install

Two ways.

  • links
<script src="https://cdn.jsdelivr.net/npm/minivaline@4/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

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.

Detail

Usage

<!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://cdn.jsdelivr.net/npm/minivaline@4/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>

Example

The Smart Way with pjax

<!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@4/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>

Options

More Option and Different Version Support here

Feedback

About

  • 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.

Contributing

We welcome you to join the development of MiniValine. Please see contributing document. 🤗

Also, we welcome PR to MiniValine.

Install dependency package

npm i

Code formatting

npm run format

Development Preview

npm run dev

Development Build

CDN_PATH

npm run build

Contributors

Code Contributors

This project exists thanks to all the people who contribute.

contributors-image

Thanks

Tribute to excellent open source! Tribute to excellent sharers!

Tribute to @xCss and @DesertsP!

Powered by MathJax

License

GPL-3.0

FOSSA Status

About

A simple and minimalist comment system.

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages