diff --git a/README.md b/README.md index 87c4c0b3..6ebdd975 100644 --- a/README.md +++ b/README.md @@ -78,6 +78,7 @@ I hope you will LoveIt ❤️! * Disqus comment system support by [Disqus](https://disqus.com) * Gitalk comment system support by [Gitalk](https://github.com/gitalk/gitalk) * Valine comment system support by [Valine](https://valine.js.org/) +* Facebook comment system support by [Facebook](https://developers.facebook.com/docs/plugins/comments/) ### Extended Features @@ -207,6 +208,7 @@ Thanks to the authors of following resources included in the theme: * [MetingJS](https://github.com/metowolf/MetingJS) * [Gitalk](https://github.com/gitalk/gitalk) * [Valine](https://valine.js.org/) +* [Facebook](https://developers.facebook.com/docs/plugins/comments/) ## Author diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 8c9f68ef..38c0f87d 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -221,6 +221,13 @@ staticDir = ["static", "../assets/others"] # static directories placeholder = "Your comment ..." visitor = true recordIP = true + + [params.facebook] # Facebook Comment Config (https://developers.facebook.com/docs/plugins/comments) + enable = false + width = "100%" + numPosts = 10 + appId = "" + languageCode = "en_US" [privacy] #### Privacy Info (https://gohugo.io/about/hugo-and-gdpr/) [privacy.googleAnalytics] diff --git a/layouts/partials/comments.html b/layouts/partials/comments.html index 0a19b5e7..fe36a994 100644 --- a/layouts/partials/comments.html +++ b/layouts/partials/comments.html @@ -75,4 +75,22 @@ }); {{- end -}} + + + {{- if .Site.Params.facebook.enable -}} + {{ .Site.Params.baseURL }}{{ .Permalink | absURL }} +
+ +
+ {{- end -}} {{- end }}