Skip to content
This repository was archived by the owner on Mar 9, 2022. It is now read-only.

Commit

Permalink
feat(comments): add commento.io comment system (#255)
Browse files Browse the repository at this point in the history
  • Loading branch information
Nir Galon authored Apr 24, 2020
1 parent c2197b7 commit f588881
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 2 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,8 @@ I hope you will LoveIt ❤️!
* **Gitalk** comment system supported by [Gitalk](https://github.com/gitalk/gitalk)
* **Valine** comment system supported by [Valine](https://valine.js.org/)
* **Facebook comments** system supported by [Facebook](https://developers.facebook.com/docs/plugins/comments/)
* **Telegram Comments** system supported by [Comments](https://comments.app/)
* **Telegram Comments** system supported by [Telegram Comments](https://comments.app/)
* **Commento comments** system supported by [Commento](https://commento.io/)

### Extended Features

Expand Down
1 change: 1 addition & 0 deletions README.zh-cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@
* 支持 **[Valine](https://valine.js.org/)** 评论系统
* 支持 **[Facebook](https://developers.facebook.com/docs/plugins/comments/) 评论**系统
* 支持 **[Telegram Comments](https://comments.app/) 评论**系统
* 支持 **[Commento](https://commento.io/)** 评论系统

### 扩展功能

Expand Down
6 changes: 5 additions & 1 deletion exampleSite/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -791,7 +791,7 @@ enableEmoji = true
appId = ""
languageCode = ""
# Telegram comments config (https://comments.app/)
# Telegram Comments 评论系统设置 (https://comments.app/)
# Telegram comments 评论系统设置 (https://comments.app/)
[params.page.comment.telegram]
enable = false
siteID = ""
Expand All @@ -801,6 +801,10 @@ enableEmoji = true
colorful = true
dislikes = false
outlined = false
# Commento comments config (https://commento.io/)
# Commento comments 评论系统设置 (https://commento.io/)
[params.page.comment.commento]
enable = true
# SEO config
# SEO 配置
[params.page.seo]
Expand Down
3 changes: 3 additions & 0 deletions exampleSite/content/posts/theme-documentation-basics.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -485,6 +485,9 @@ Note that some of these parameters are explained in details in other sections of
colorful = true
dislikes = false
outlined = false
# {{< version 0.2.0 >}} {{< link "https://commento.io/" "Commento" >}} comment config
[params.page.comment.commento]
enable = true
# {{< version 0.2.0 >}} SEO config
[params.page.seo]
# Publisher info
Expand Down
3 changes: 3 additions & 0 deletions exampleSite/content/posts/theme-documentation-basics.fr.md
Original file line number Diff line number Diff line change
Expand Up @@ -490,6 +490,9 @@ Note that some of these parameters are explained in details in other sections of
colorful = true
dislikes = false
outlined = false
# {{< version 0.2.0 >}} {{< link "https://commento.io/" "Commento" >}} comment config
[params.page.comment.commento]
enable = true
# {{< version 0.2.0 >}} SEO config
[params.page.seo]
# Publisher info
Expand Down
3 changes: 3 additions & 0 deletions exampleSite/content/posts/theme-documentation-basics.zh-cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -488,6 +488,9 @@ hugo
colorful = true
dislikes = false
outlined = false
# {{< version 0.2.0 >}} {{< link "https://commento.io/" "Commento" >}} 评论系统设置
[params.page.comment.commento]
enable = true
# {{< version 0.2.0 >}} SEO config
[params.page.seo]
# 出版者信息
Expand Down
9 changes: 9 additions & 0 deletions layouts/partials/comment.html
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,15 @@
Please enable JavaScript to view the comments powered by <a href="https://comments.app/">Telegram Comments</a>.
</noscript>
{{- end -}}

{{- /* Commento Comment System */ -}}
{{- if $comment.commento.enable -}}
<div id="commento"></div>
{{- dict "source" "https://cdn.commento.io/js/commento.js" "defer" true | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}}
<noscript>
Please enable JavaScript to view the comments powered by <a href="https://commento.io/">Commento</a>.
</noscript>
{{- end -}}
</div>
{{- end -}}

Expand Down

0 comments on commit f588881

Please sign in to comment.