Skip to content

Commit

Permalink
Add comments to blogs post, and docs
Browse files Browse the repository at this point in the history
  • Loading branch information
rlaverde committed Aug 24, 2016
1 parent d9dc4da commit 9028ca9
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
7 changes: 7 additions & 0 deletions models/blog-post.ini
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,13 @@ label = Publication date
type = datetime
width = 1/4

[fields.allow_comments]
label = Allow Comments
type = boolean
default = yes
checkbox_label = Show comment box
width = 1/4

[fields.body]
label = Body
type = markdown
6 changes: 6 additions & 0 deletions templates/blog-post.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,10 @@
{% block title %}{{ this.title }}{% endblock %}
{% block body %}
{{ render_blog_post(this) }}
{% if this.allow_comments %}
<div class="comment-box">
<h2>Comments</h2>
{{ render_disqus_comments() }}
</div>
{% endif %}
{% endblock %}
2 changes: 1 addition & 1 deletion templates/doc-page.html
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ <h4>
{% if this.allow_comments %}
<div class="comment-box">
<h2>Comments</h2>

{{ render_disqus_comments() }}
</div>
{% endif %}
</div>
Expand Down

0 comments on commit 9028ca9

Please sign in to comment.