From 26a6a0a7cd6601bc02ab3c55a6ec1dceafa8b969 Mon Sep 17 00:00:00 2001
From: John Tobin <johntobin@johntobin.ie>
Date: Mon, 15 Jul 2019 23:42:28 +0000
Subject: [PATCH] Check if commentoUrl is set before using it. (#198)

---
 layouts/partials/posts/commento.html |    2 +-
 layouts/partials/posts/disqus.html   |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/layouts/partials/posts/commento.html b/layouts/partials/posts/commento.html
index 4889dc8..936f3bd 100644
--- a/layouts/partials/posts/commento.html
+++ b/layouts/partials/posts/commento.html
@@ -1,4 +1,4 @@
-{{- if and (not (eq .Site.Params.commentoUrl "" )) (eq (.Params.disable_comments | default false) false) -}}
+{{- if and (isset .Site.Params "commentourl") (not (eq .Site.Params.commentoUrl "" )) (eq (.Params.disable_comments | default false) false) -}}
 <div id="commento"></div>
 <script src="{{ .Site.Params.commentoUrl }}/js/commento.js"></script>
 {{- end -}}
diff --git a/layouts/partials/posts/disqus.html b/layouts/partials/posts/disqus.html
index 2f1e5b4..c7471dd 100644
--- a/layouts/partials/posts/disqus.html
+++ b/layouts/partials/posts/disqus.html
@@ -1,3 +1,3 @@
-{{- if and (not (eq .Site.DisqusShortname "" )) (eq (.Params.disable_comments | default false) false) -}}
+{{- if and (isset .Site "disqusshortname") (not (eq .Site.DisqusShortname "" )) (eq (.Params.disable_comments | default false) false) -}}
   {{ template "_internal/disqus.html" . }}
 {{- end -}}

--
Gitblit v1.10.0