Migration from Valine
Deploy backend according to Vercel Deploy in Get Started section.
Modify frontend scripts according to HTML in Get Started section.
- <script src='//unpkg.com/valine/dist/Valine.min.js'></script> + <script src='//unpkg.com/@waline/client@v2/dist/waline.js'></script> + <link href='//unpkg.com/@waline/client@v2/dist/waline.css' rel='stylesheet' /> <script> - new Valine({ + Waline.init({ el: '#vcomments', - appId: 'Your appId', - appKey: 'Your appKey' + serverURL: 'YOUR SERVER URL' }); </script>
Config
Waline V2 has removed Valine support and moved to a better configuration. The following is a migration summary of some options:
placeholder: uselocales.placeholderhighlight: usehighlighteravatarForce,avatar: use the server'sAVATAR_PROXYenvironment variablerecordIP: no longer display the user IP, and provide theDISABLE_USERAGENTenvironment variable on the serverrequiredFields: renamed torequiredMetalangMode: renamed tolocalesemojiCDN,emojiMap: use more powerfulemojioptions
For waline config, please refer to Client Config. You can also check Waline Client V2 Migration Guide to learn about the options that are not compatible with Valine.
- Migrate data
Select Import/Export > Limit to certain classes > Comment > Export in the LeanCloud background, and then you will receive a email notification.
Paste the content of export file into the textarea below, and click the convert button to obtain the file to be imported.
Consejos
After you get the exported file through the tool above, you can import it in the corresponding storage service console.
Waline Highlights
Compared with Valine, Waline has the following highlights:
More features
- Markdown supports more syntax, including superscript and subscript, emoji, tables, strike-through, mathematical formulas, HTML tags, footnotes, etc.
- Image upload feature, which allows customized image provider service or embedding images directly.
- The brand new label system adds level labels for users according to the frequency of user interaction, and support custom labels for registered users.
- Emoji presets and tab support, allowing multiple sets of Emoji, while allowing anyone to publish and use Emoji presets.
- A brand new reaction system that allows visitors to express their attitude towards the article.
- Comment likes, express support for the comment you like.
- Pageviews, more accurate viewing and anti-tampering.
- Emoji search. Customizable service, allowing users to search and insert emoticons freely.
- Support registered users to edit and delete their published comments.
Safer
- Zero privacy leakage, will not expose user mailboxes, IP addresses and other sensitive information, and can choose to hide user geographic location, browser and operating system at server
- Complete anti-spam system.
- All comments can be authenticated by anti-spam services and support additional validation logic.
- You can set the comment speed limit for a single IP or a single user, and Waline automatically identify duplicate comments.
- Comment review feature, in sensitive periods or when the website is under attack, you can enable comment review, manually review and approve the display of comments, and prevent malicious comments from causing site closure.
- Support user accounts. Besides registering an account, Waline also supports social media accounts, quickly synchronizes avatars and nicknames with authorized label to prevent identity fraud.
more convenient
- Various methods (QQ, WeChat, DingTalk, E-mail), etc. to notify bloggers about comments
- Powerful management service, you can view all users and comments and perform related operations, and set custom labels and administrators for users
- Front-end management, administrators can review, edit or delete comments directly through the Waline comment component.
