Merge pull request #1066 from MrJoy/enable_disabling_comments

Make it possible to disable the comments section entirely without having to muck with theme files.
This commit is contained in:
Parker Moore 2013-02-24 14:45:35 -08:00
commit 214dfb8608
4 changed files with 10 additions and 0 deletions

View File

@ -1,3 +1,4 @@
{% if site.use_comments %}
<section> <section>
<h1>Comments</h1> <h1>Comments</h1>
{% include custom/comments.html %} {% include custom/comments.html %}
@ -5,3 +6,4 @@
<div id="disqus_thread" aria-live="polite">{% include post/disqus_thread.html %}</div> <div id="disqus_thread" aria-live="polite">{% include post/disqus_thread.html %}</div>
{% endif %} {% endif %}
</section> </section>
{% endif %}

View File

@ -1,3 +1,5 @@
{% comment %} {% comment %}
To use a custom comment system, add the javascript to custom/after_footer.html then add the container for your comments here. 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 %} {% endcomment %}

View File

@ -42,3 +42,7 @@ linklog_marker: "&rarr;"
linklog_marker_position: after linklog_marker_position: after
linklog_marker_position_feed: after linklog_marker_position_feed: after
standard_post_marker: 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

View File

@ -3,6 +3,8 @@
# Disqus Comments Configuration # # 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_short_name:
disqus_show_comment_count: false disqus_show_comment_count: false
disqus_developer: 0 disqus_developer: 0