Skip to content

Commit 2260de1

Browse files
committed
site: introduce to twikoo comment system
1 parent b1d6d9a commit 2260de1

4 files changed

Lines changed: 15 additions & 2 deletions

File tree

config/_default/params.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ showPagination = true
3333
showhero = true
3434
showTaxonomies = true
3535
showRelatedContent = true
36+
showComments = true
3637
relatedContentLimit = 5
3738
heroStyle = "background"
3839

content/pages/about/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ showDate: false
55
showReadingTime: false
66
showWordCount: false
77
showTableOfContents: false
8-
comments: false
8+
showComments: false
99
---
1010

1111
## 关于我

content/pages/links/index.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,15 @@ showDate: false
2727
showReadingTime: false
2828
showWordCount: false
2929
showTableOfContents: false
30-
comments: false
30+
showComments: true
3131
showhero: true
3232
herostyle: background
3333
---
3434

3535
欢迎交换~
3636

37+
在评论区留言也可
38+
3739
这是我的信息:
3840

3941
- T.本秋的自留地

layouts/partials/comments.html

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{{- /* 评论区 - Twikoo */ -}}
2+
<div id="tcomment"></div>
3+
<script src="https://cdn.jsdelivr.net/npm/twikoo@latest/dist/twikoo.all.min.js"></script>
4+
<script>
5+
twikoo.init({
6+
envId: 'https://twikoo.texsd.eu.org',
7+
el: '#tcomment',
8+
lang: 'zh-CN',
9+
})
10+
</script>

0 commit comments

Comments
 (0)