From e933bf39b74518c8739a9d6a683b3fe5ebca066d Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Mon, 20 Jul 2020 20:11:58 +0530 Subject: [PATCH] comments: rm comments - user needs to enable comments in hugo config + params: comments: true - disabled by default --- layouts/_default/single.html | 22 +++------------------- layouts/partials/comments.html | 5 +++++ 2 files changed, 8 insertions(+), 19 deletions(-) create mode 100644 layouts/partials/comments.html diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 8221a23d..08976000 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -20,25 +20,9 @@ {{- end }} - - {{- if not (eq .Params.comments false) }} - {{- if .Site.DisqusShortname }} -
- - - - {{- end }} + + {{- if $.Site.Params.comments }} + {{- partial "comments.html" . }} {{- end }} diff --git a/layouts/partials/comments.html b/layouts/partials/comments.html new file mode 100644 index 00000000..d6ff0103 --- /dev/null +++ b/layouts/partials/comments.html @@ -0,0 +1,5 @@ + + + \ No newline at end of file