Waline

A backend commenting system derived from Valine. Waline can be equivalent to With backend Valine. Compared with valine, it is more secure, fast, concise, and open source.

View details:

  • https://github.com/walinejs/waline

  • https://waline.js.org/

How to use in Redefine theme:

LeanCloud settings (database)

  1. Login or Register LeanCloud International Edition and enter the [Console](https:/ /console.leancloud.app/apps)

  2. Click on the upper left corner Create App and give a name you like (please choose the free development version):

Create app
  1. Go to Apps, select Settings > App Key in the lower left corner. You can see your APP ID, APP Key and Master Key. Please record them for later use.

:::warning

The domestic version needs to complete the record access

If you are using the domestic version of Leancloud (leancloud.cn), we recommend you switch to the international version (leancloud.app .app/)). Otherwise, you need to bind an additional registered domain name to the application, purchase a dedicated IP, and complete the registration access:

  • Log in to the domestic version and enter the application you need to use

  • Select Settings > Domain binding > API access domain name > Bind new domain name > Enter the domain name > OK.

  • Follow the prompts on the page to complete the CNAME resolution on DNS as required.

  • Purchase a dedicated IP and submit a work order to complete the record access. (The current price of dedicated IP is ¥50/unit/month)

Domain Settings

:::

Vercel deployment (server)

[Vercel](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fwalinejs%2Fwaline%2Ftree% 2Fmain%2Fexample)

  1. Click the button above to jump to Vercel for server-side deployment.

    :::tip

    Note: If you are not logged in, Vercel will ask you to register or log in, please use your GitHub account to log in quickly.

    :::

  2. Enter a Vercel project name you like and click Create to continue:

    Create project
  3. At this point, Vercel will help you create and initialize a warehouse based on the Waline template. The warehouse name is the project name you entered earlier.

    deploy

    After a minute or two, a full screen of fireworks will celebrate your deployment. At this point, click Go to Dashboard to jump to the application console.

    deploy
  4. Click Settings - Environment Variables at the top to enter the environment variable configuration page, and configure three environment variables LEAN_ID, LEAN_KEY and LEAN_MASTER_KEY. Their values correspond to the APP ID, APP KEY, Master Key obtained in LeanCloud in the previous step.

    Set environment variables

    Note

    If you use the domestic version of LeanCloud, please additionally configure the LEAN_SERVER environment variable, the value of which is your bound domain name.

  5. After the environment variable configuration is complete, click Deployments at the top and click the Redeploy button to the right of the latest deployment at the top to redeploy. This step is to make the environment variables just set take effect.

    redeploy
  6. At this point, it will jump to the Overview interface to start the deployment. After a while, the STATUS will become Ready. At this point, please click Visit to jump to the deployed website address, which is your server address.

    redeploy success

    Bind domain name (optional)

    If you don't want to use vercel's domain, you can add your own domain

    1. Click Settings - Domains at the top to enter the domain name configuration page

    2. Enter the domain name to be bound and click Add

      Add domain
    3. Add a new CNAME resolution record at the domain name server

      Type
      Name
      Value

      CNAME

      example

      cname.vercel-dns.com

    4. Wait for it to take effect, you can access it through your own domain name🎉

      • Comment system: example.yourdomain.com

      • Comment management: example.yourdomain.com/ui

      success

Redefine theme settings

Fill in the necessary parameter information (APP ID, APP Key, etc.) in the Redefine theme configuration file. The example is as follows.

waline:
  serverUrl: # Waline server url(vercel) example: https://example.example.com
  lang: zh-CN # Waline language, default: zh-CN
  dark: auto # Waline dark mode, default: auto

Waline review plugin renderings.

Screen Shot 2022-10-03 at 10.17.15 PM

Last updated