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)
Click on the upper left corner Create App and give a name you like (please choose the free development version):

Go to Apps, select
Settings
>App Key
in the lower left corner. You can see yourAPP ID
,APP Key
andMaster 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)

:::
Vercel deployment (server)
[](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fwalinejs%2Fwaline%2Ftree% 2Fmain%2Fexample)
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.
:::
Enter a Vercel project name you like and click
Create
to continue:Create project 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 Click
Settings
-Environment Variables
at the top to enter the environment variable configuration page, and configure three environment variablesLEAN_ID
,LEAN_KEY
andLEAN_MASTER_KEY
. Their values correspond to theAPP 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.After the environment variable configuration is complete, click
Deployments
at the top and click theRedeploy
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 At this point, it will jump to the
Overview
interface to start the deployment. After a while, theSTATUS
will becomeReady
. At this point, please clickVisit
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
Click
Settings
-Domains
at the top to enter the domain name configuration pageEnter the domain name to be bound and click
Add
Add domain Add a new
CNAME
resolution record at the domain name serverTypeNameValueCNAME
example
cname.vercel-dns.com
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
serverUrl
is required. It is your Vercel domain name (or a custom domain name you bind)lang
is required. Comment language, see Waline official documentation#langdark
is required. Whether to start dark mode, see Waline official documentation#dark
Waline review plugin renderings.

Last updated