Add partial for commento and enable it for prod environment

Signed-off-by: Harsh Shandilya <msfjarvis@gmail.com>
This commit is contained in:
Harsh Shandilya 2020-01-20 01:08:23 +05:30
parent fa4bcb2d96
commit c84824b73e
No known key found for this signature in database
GPG Key ID: C2E74282C2133D62
3 changed files with 6 additions and 2 deletions

View File

@ -8,6 +8,7 @@ pygmentsUseClasses = true
description = "Android Developer, Kotlin fanatic and wannabe Rustacean"
keywords = "homepage, blog, android, kotlin, programming"
contentTypeName = "posts"
CommentoURL = "https://commento.msfjarvis.dev"
[Menus]
main = [

View File

@ -11,8 +11,8 @@
{{- end -}}
</div>
{{ if .Site.DisqusShortname -}}
{{ if and .Site.Params.CommentoURL (and (not .Site.BuildDrafts) (not .Site.IsServer)) -}}
<h2>Comments</h2>
{{ template "_internal/disqus.html" . }}
{{ partial "commento.html" . }}
{{- end }}
{{- end }}

View File

@ -0,0 +1,3 @@
<div id="commento"></div>
<script defer src="{{ .Site.Params.CommentoURL }}/js/commento.js"></script>
<noscript>Please enable JavaScript to load the comments.</noscript>