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
This commit is contained in:
Florian Pöhler authored and George committed 2019-12-07 16:38:25 +00:00
1 parent cdf5ef1096
commit bba41637a0
2 files changed
+7 -1

No files matched your search

+5
View File
@@ -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
############################
+2 -1
View File
@@ -1,2 +1,3 @@
<div id="commento"></div>
<script src="https://cdn.commento.io/js/commento.js" defer></script>
{{ $url := (printf "%s/js/commento.js" (site.Params.comments.commento.url | default "https://cdn.commento.io")) }}
<script src="{{$url}}" defer></script>