From bba41637a0a4a1082a967943c7f7bc1d9b0feb8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20P=C3=B6hler?= Date: Sat, 7 Dec 2019 17:38:25 +0100 Subject: [PATCH] feat: add option to use self hosted Commento If you are using the Commento cloud service, you do not need to change anything, but if you want to use a self hosted instance, you can now provide the base url to your Commento instance. Close #1446 --- exampleSite/config/_default/params.toml | 5 +++++ layouts/partials/comments/commento.html | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/exampleSite/config/_default/params.toml b/exampleSite/config/_default/params.toml index dc0fe94f..2a43655e 100644 --- a/exampleSite/config/_default/params.toml +++ b/exampleSite/config/_default/params.toml @@ -212,6 +212,11 @@ plugins_js = [] shortname = "" # Paste the shortname from your Disqus dashboard. show_count = true # Show comment count in page header? (true/false) + # Configuration of Commento. + [comments.commento] + # If self-hosting Commento, enter its URL here (e.g. "https://commento.?.com"), otherwise leave empty. + url = "" + ############################ ## Search ############################ diff --git a/layouts/partials/comments/commento.html b/layouts/partials/comments/commento.html index 8d9a1975..cacf3a54 100644 --- a/layouts/partials/comments/commento.html +++ b/layouts/partials/comments/commento.html @@ -1,2 +1,3 @@
- +{{ $url := (printf "%s/js/commento.js" (site.Params.comments.commento.url | default "https://cdn.commento.io")) }} +