🇨🇦
hexo-theme-redefine
BlogGithub
English
English
  • Project Description
  • Get Started
    • Installation
    • Update
    • Usage
  • Configuration
    • Create a theme config file
    • base_info
    • style
      • primary_color
      • avatar
      • favicon
      • article_img_align
      • left_side_width
      • content_max_width
      • nav_color
      • hover
      • first_screen
      • scroll
    • social_contact
    • menu
    • home_article
    • post
      • word_count
      • author_label
    • toc
    • copyright_info
    • website_count
    • local_search
    • comment
      • use
      • Waline
      • Gitalk
      • Twikoo
    • rss
    • lazyload
    • cdn
    • pjax
    • footer
  • Advanced
    • Create a page
    • Note modules
    • Article top
    • Mathematical formula
    • Friendship style
    • file comparison
    • Resource compression
Powered by GitBook
On this page
  • LeanCloud settings (database)
  • Vercel deployment (server)
  • Redefine theme settings
  1. Configuration
  2. comment

Waline

PrevioususeNextGitalk

Last updated 2 years ago

A backend commenting system derived from . 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. or LeanCloud International Edition and enter the [Console](https:/ /console.leancloud.app/apps)

  2. Click on the upper left corner 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

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

:::

Vercel deployment (server)

  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:

  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.

    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.

  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.

    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.

  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.

    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

    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

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
  • serverUrl is required. It is your Vercel domain name (or a custom domain name you bind)

Waline review plugin renderings.

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

Domain Settings

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

Create project
deploy
deploy
Set environment variables
redeploy
redeploy success
Add domain
success

lang is required. Comment language, see

dark is required. Whether to start dark mode, see

Screen Shot 2022-10-03 at 10.17.15 PM
leancloud.cn
leancloud.app
Waline official documentation#lang
Waline official documentation#dark
Valine
Login
Register
Create App
Vercel