Quick start

Get AppID and AppKey

Click here to register or login in leancloud.
Click here Create new application in Leancloud, and you will get AppID/AppKey.

HTML structure

Please include the following HTML code in the appropriate location on the article page that requires the comment box:

<head>
    ...
    <script src='//unpkg.com/valine/dist/Valine.min.js'></script>
    ...
</head>
<body>
    ...
    <div id="vcomment"></div>
    <script>
        new Valine({
            el: '#vcomment' ,
            appId: 'Your appId',
            appKey: 'Your appKey'
        });
    </script>
</body>

npm

Valine has been released to npm and can be installed directly by command:

# Install valine
npm install valine --save

// Use import
import Valine from 'valine';
// or Use require
const Valine = require('valine');

new Valine({
    el:'#vcomments',
    // other config
})

See the Config for more details.

© 2017 - 2024
Powered By xCss.