From c84824b73ec8c65c259900547c2f9c6eff755ebf Mon Sep 17 00:00:00 2001 From: Harsh Shandilya Date: Mon, 20 Jan 2020 01:08:23 +0530 Subject: [PATCH] Add partial for commento and enable it for prod environment Signed-off-by: Harsh Shandilya --- config.toml | 1 + layouts/_default/single.html | 4 ++-- layouts/partials/commento.html | 3 +++ 3 files changed, 6 insertions(+), 2 deletions(-) create mode 100644 layouts/partials/commento.html diff --git a/config.toml b/config.toml index f8771ee..32bb0ce 100644 --- a/config.toml +++ b/config.toml @@ -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 = [ diff --git a/layouts/_default/single.html b/layouts/_default/single.html index a2ca170..9107f70 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -11,8 +11,8 @@ {{- end -}} -{{ if .Site.DisqusShortname -}} +{{ if and .Site.Params.CommentoURL (and (not .Site.BuildDrafts) (not .Site.IsServer)) -}}

Comments

-{{ template "_internal/disqus.html" . }} +{{ partial "commento.html" . }} {{- end }} {{- end }} diff --git a/layouts/partials/commento.html b/layouts/partials/commento.html new file mode 100644 index 0000000..ff6766c --- /dev/null +++ b/layouts/partials/commento.html @@ -0,0 +1,3 @@ +
+ +