diff --git a/README.md b/README.md index 91d9ac14..bf9384c3 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/README.zh-cn.md b/README.zh-cn.md index 33b4e234..2dc8204e 100644 --- a/README.zh-cn.md +++ b/README.zh-cn.md @@ -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/)** 评论系统 ### 扩展功能 diff --git a/exampleSite/config.toml b/exampleSite/config.toml index dbc1ae1a..44c46956 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -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 = "" @@ -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] diff --git a/exampleSite/content/posts/theme-documentation-basics.en.md b/exampleSite/content/posts/theme-documentation-basics.en.md index 1eb5bfc0..cdb5caf9 100644 --- a/exampleSite/content/posts/theme-documentation-basics.en.md +++ b/exampleSite/content/posts/theme-documentation-basics.en.md @@ -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 diff --git a/exampleSite/content/posts/theme-documentation-basics.fr.md b/exampleSite/content/posts/theme-documentation-basics.fr.md index ed7ccc2b..143be4d0 100644 --- a/exampleSite/content/posts/theme-documentation-basics.fr.md +++ b/exampleSite/content/posts/theme-documentation-basics.fr.md @@ -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 diff --git a/exampleSite/content/posts/theme-documentation-basics.zh-cn.md b/exampleSite/content/posts/theme-documentation-basics.zh-cn.md index c935ceed..a1b8aeaf 100644 --- a/exampleSite/content/posts/theme-documentation-basics.zh-cn.md +++ b/exampleSite/content/posts/theme-documentation-basics.zh-cn.md @@ -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] # 出版者信息 diff --git a/layouts/partials/comment.html b/layouts/partials/comment.html index 499bd763..9dbd1e17 100644 --- a/layouts/partials/comment.html +++ b/layouts/partials/comment.html @@ -100,6 +100,15 @@ Please enable JavaScript to view the comments powered by Telegram Comments. {{- end -}} + + {{- /* Commento Comment System */ -}} + {{- if $comment.commento.enable -}} +
+ {{- dict "source" "https://cdn.commento.io/js/commento.js" "defer" true | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}} + + {{- end -}} {{- end -}}