Comment System
Comment system for pages at the bottom
Waline Comment System
The theme’s comment, read statistics, likes, and other functionalities are all provided by Waline(原站外链接,已停用).
Remove
If you have some reasons to remove the comment system, or just learn how to change to other comment systems, this section might help you. But if you want to know how to configure it, you can skip this section.
Remove it by the following steps:
-
set
enabletofalseinsrc/site.config.ts.src/site.config.ts
tsexport const integ: IntegrationUserConfig = { // ... waline: { enable: false } } -
Remove dependency
@waline/client:
shellbun remove @waline/client -
Remove folder
src/components/waline. -
Remove relative code in these layouts:
src/layouts/CommonPage.astrosrc/layouts/BlogPost.astro
-
Remove relative config like
commentorviewconfiguring for the earlier edited layouts in these files:src/pages/about/index.astrosrc/pages/links/index.astrosrc/pages/projects/index.astro- Other blog post frontmatter config if exists
Deploy
You can refer to its documentation for configuration, and it is recommended to use the Vercel(原站外链接,已停用) + Supabase(原站外链接,已停用) combination.
Configuration
Then you can configure the Waline comment system in the integrationConfig.server.
export const integ: IntegrationUserConfig = {
// ...
waline: {
enable: true,
// Server service link
server: 'https://astro-theme-pure-waline.arthals.ink/',
// Refer https://waline.js.org/en/guide/features/emoji.html
emoji: ['bmoji', 'weibo'],
// Refer https://waline.js.org/en/reference/client/props.html
additionalConfigs: {
pageview: true,
comment: true
// ...
}
}
}tsUsage
You can call it manually in .astro or .mdx files.
import { Comment } from '@/components/waline'
// prettier-ignore
;<Comment />jsxRender:
内容归属:CuiFrost
内容索引
-
个人笔记
-
模板说明 · Setup
-
模板说明 · Integrations
-
模板说明 · Advanced