Skip to content

Commit

Permalink
feat: add waline platform.
Browse files Browse the repository at this point in the history
  • Loading branch information
MortyZhaoy committed Sep 5, 2024
1 parent 984ce27 commit a4b77d2
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 0 deletions.
4 changes: 4 additions & 0 deletions config/_default/params.toml
Original file line number Diff line number Diff line change
Expand Up @@ -155,3 +155,7 @@ smartTOCHideUnfocusedChildren = false
# bing = ""
# pinterest = ""
# yandex = ""

Comments
enable = true
provider = "waline"
2 changes: 2 additions & 0 deletions content/projects/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,7 @@ title: "Projects"
description: "Learn about some of my projects."
cascade:
showReadingTime: false
Comments:
provider: "waline"
---
This section contains all my current projects.
2 changes: 2 additions & 0 deletions content/projects/_index.zh-cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,7 @@ title: "项目"
description: "了解我的一些项目。"
cascade:
showReadingTime: false
Comments:
provider: "waline"
---
本部分包含我当前的所有项目。
24 changes: 24 additions & 0 deletions layouts/partials/Comments/waline.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<link href="https://unpkg.com/@waline/client@v3/dist/waline.css" rel="stylesheet" />
<script src="https://unpkg.com/@waline/client@v3/dist/waline.js"></script>

<div id="waline"></div>
<script type="module">
import { init } from 'https://unpkg.com/@waline/client@v3/dist/waline.js';
init({
el: '#waline',
meta: ['nick','mail','link'], // 评论属性
requiredMeta: ['nick','mail'], // 必填项,昵称与邮件
login: 'force', // 登录后访问
comment: true, // 评论数统计
placeholder: '欢迎评论', // 评论框占位提示符
serverURL: "https://blogwaline-jog2tc2g2-mortyzhaoys-projects.vercel.app/", // Waline 服务端地址
avatar: "wavatar", // 头像
avatarCDN: "https://sdn.geekzu.org/avatar/", // 头像cdn
pageSize: 10, // 评论每页条数
lang: "zh-CN", // 语言
visitor: true, // 文章访问量统计
highlight: true, // 代码高亮
uploadImage: false, // 评论上传图片功能
emoji: "https://cdn.jsdelivr.net/gh/walinejs/[email protected]/weibo" // emoji 表情包
})
</script>

0 comments on commit a4b77d2

Please sign in to comment.