Waline

Mr.Hope ... 2021-5-16 About 2 min

Welcome to Waline. In just a few steps, you can enable Waline to provide comments and pageviews on your site.

# LeanCloud Settings (Database)

  1. sign in (opens new window) or sign up (opens new window) LeanCloud and enter Console (opens new window).

  2. Click Create app (opens new window) button to create a new app and enter a name you like:

    Create App

  3. Enter the app, then select Settings > App Keys at the left bottom corner. You will see APP ID, APP Key and Master Key of your app. We will use them later

    ID and Key

# Deploy to Vercel (Server)

Vercel (opens new window)

  1. Click the blue button above, it will redirect you to vercel to deploy with waline template.

  2. If you haven’t logined, we recommend you to sign in with GitHub.

  3. Input your Vercel project name then click Create.

    Create Project

  4. Then Vercel will let you create Vercel Team account, click Skip and go on.

    skip team

  5. Repo which named you input before will be created and initiallized automatically base on waline example template by Vercel.

    deploy

    After one minute or two, vercel should finish the deployment. Click Go to Dashboard button to redirect to your application dashboard.

    deploy

  6. Click Settings menu on the top, and Environment Variables button on the side to go to envrionment variables setting page. Then set LEAN_ID, LEAN_KEY and LEAN_MASTER_KEY. The variables’ value should be the ones you got in the previous step. APP ID is the value of LEAN_ID, and APP Key to LEAN_KEY, Master Key to LEAN_MASTER_KEY.

    set environment variables

  7. To let your environment variables setting active, you need redeploy your application. Click Deployments menu on the top and find the latest deployment at the top of list, click Redeploy button in the right dropdown menu.

    redeploy

  8. If everything is ok, vercel will redirect to Overview page to start redeployment. Wait a moment the STATUS will change to Ready. Now you can click Visit to visit the site. This link is your server address.

    redeploy success

# Client

# Using plugin

Set type: "waline" in the plugin options, and set serverURL as the link obtained in the previous step.

Then, place the <CommentService> component at a suitable location in your site (usually at the bottom of the page), you will be able to see the comment box.

Tips

You can also pass in other options supported by Waline (except el).

For details, see Waline Config

# Comment Management

  1. After the deployment is complete, please visit <serverURL>/ui/register to register. The first person to register will be set as an administrator.
  2. After you log in as administrator, you can see the comment management interface. You can edit, mark or delete comments here.
  3. Users can also register their account in the comment box, and they will be redirected to their profile page after logging in.
Last update: May 15, 2022 07:03
Contributors: Mr.Hope , Mr.Hope