mirror of
https://github.com/13hannes11/hugo-coder-timeline.git
synced 2024-09-04 00:50:58 +02:00
* Check if commentoUrl is set before using it. When a variable does not exist it evaluates to `nil`, and so the check `(not (eq .Site.Params.commentoUrl ""))` evaluates to true rather than false because `nil` is not "". Before this change, unless you explicitly set Params.commentoUrl to "", the commento HTML block would be added, and this fails because /js/commento.js does not exist. This change ensures that the commento HTML block is only added whe Params.commentoUrl exists and is set to a non-empty string. * Check if DisqusShortname is set before using it.
4 lines
193 B
HTML
4 lines
193 B
HTML
{{- if and (isset .Site "disqusshortname") (not (eq .Site.DisqusShortname "" )) (eq (.Params.disable_comments | default false) false) -}}
|
|
{{ template "_internal/disqus.html" . }}
|
|
{{- end -}}
|