From 187d86b5146233f5f438d176a434e4838fa96d0f Mon Sep 17 00:00:00 2001 From: Jon Frisby Date: Thu, 21 Feb 2013 23:58:19 -0800 Subject: [PATCH 1/2] Make it possible to disable the comments section entirely without having to muck with theme files. --- .themes/classic/source/_includes/comments.html | 2 ++ .themes/classic/source/_includes/custom/comments.html | 2 ++ _config/defaults/disqus.yml | 2 ++ 3 files changed, 6 insertions(+) diff --git a/.themes/classic/source/_includes/comments.html b/.themes/classic/source/_includes/comments.html index c910032..fc1ce18 100644 --- a/.themes/classic/source/_includes/comments.html +++ b/.themes/classic/source/_includes/comments.html @@ -1,3 +1,4 @@ +{% if site.use_comments %}

Comments

{% include custom/comments.html %} @@ -5,3 +6,4 @@
{% include post/disqus_thread.html %}
{% endif %}
+{% endif %} diff --git a/.themes/classic/source/_includes/custom/comments.html b/.themes/classic/source/_includes/custom/comments.html index c5202f3..d710263 100644 --- a/.themes/classic/source/_includes/custom/comments.html +++ b/.themes/classic/source/_includes/custom/comments.html @@ -1,3 +1,5 @@ {% comment %} To use a custom comment system, add the javascript to custom/after_footer.html then add the container for your comments here. + +Be sure to set "use_comments: true" in site.yml or the comments section will not be displayed! {% endcomment %} diff --git a/_config/defaults/disqus.yml b/_config/defaults/disqus.yml index 642f7a4..acddd45 100644 --- a/_config/defaults/disqus.yml +++ b/_config/defaults/disqus.yml @@ -3,6 +3,8 @@ # Disqus Comments Configuration # # --------------------------------- # +# In order to use Disqus you must both set the short name here, AND set +# "use_comments: true" in site.yml. disqus_short_name: disqus_show_comment_count: false disqus_developer: 0 From c8b5854f0fe6afc5716849737d0d128981084700 Mon Sep 17 00:00:00 2001 From: Jon Frisby Date: Sat, 23 Feb 2013 23:46:55 -0800 Subject: [PATCH 2/2] Adding a default for comment disabling. --- _config/defaults/classic.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/_config/defaults/classic.yml b/_config/defaults/classic.yml index 3eb3b54..7eec157 100644 --- a/_config/defaults/classic.yml +++ b/_config/defaults/classic.yml @@ -42,3 +42,7 @@ linklog_marker: "→" linklog_marker_position: after linklog_marker_position_feed: after standard_post_marker: + +# Disable all comments by default. If you're using Disqus, or a custom comment system, add +# "use_comments: true" to your site.yml. +use_comments: false