From 4cdb15035764f16d589724a84bb965b8ab000352 Mon Sep 17 00:00:00 2001 From: Dean Attali Date: Wed, 1 Apr 2020 17:37:53 -0400 Subject: [PATCH] small refactor and cleanup to comments system --- _includes/comments.html | 6 ++++++ _includes/disqus.html | 2 ++ _includes/staticman-comments.html | 2 ++ _layouts/page.html | 11 +---------- _layouts/post.html | 12 +----------- 5 files changed, 12 insertions(+), 21 deletions(-) create mode 100644 _includes/comments.html diff --git a/_includes/comments.html b/_includes/comments.html new file mode 100644 index 0000000..5afdf39 --- /dev/null +++ b/_includes/comments.html @@ -0,0 +1,6 @@ +{% if page.comments %} + {% include disqus.html %} + {% include fb-comment.html %} + {% include staticman-comments.html %} + {% include utterances-comment.html %} +{% endif %} \ No newline at end of file diff --git a/_includes/disqus.html b/_includes/disqus.html index dd80975..3c55422 100644 --- a/_includes/disqus.html +++ b/_includes/disqus.html @@ -1,4 +1,5 @@ {%- if site.disqus -%} +
+
{%- endif -%} diff --git a/_includes/staticman-comments.html b/_includes/staticman-comments.html index d83d1c5..bd25de3 100644 --- a/_includes/staticman-comments.html +++ b/_includes/staticman-comments.html @@ -1,4 +1,5 @@ {% if site.staticman.repository and site.staticman.branch %} +
@@ -78,4 +79,5 @@ } +
{% endif %} diff --git a/_layouts/page.html b/_layouts/page.html index 31d9d83..2650c12 100644 --- a/_layouts/page.html +++ b/_layouts/page.html @@ -8,16 +8,7 @@ layout: base
{{ content }} - {% if page.comments %} -
- {% include disqus.html %} -
- {% include fb-comment.html %} -
- {% include staticman-comments.html %} -
- {% include utterances-comment.html %} - {% endif %} + {% include comments.html %}
diff --git a/_layouts/post.html b/_layouts/post.html index c7bea3e..391f26a 100644 --- a/_layouts/post.html +++ b/_layouts/post.html @@ -64,17 +64,7 @@ layout: base {% endif %} - - {% if page.comments %} -
- {% include disqus.html %} -
- {% include fb-comment.html %} -
- {% include staticman-comments.html %} -
- {% include utterances-comment.html %} - {% endif %} + {% include comments.html %}