add support for comments on any page

This commit is contained in:
Dean Attali 2015-03-13 18:35:19 -07:00
parent ff0de0bb13
commit bde8a560c7
4 changed files with 24 additions and 11 deletions

View File

@ -77,6 +77,12 @@ paginate: 5
# Default YAML values (more information on Jekyll's site) # Default YAML values (more information on Jekyll's site)
defaults: defaults:
-
scope:
path: ""
type: "posts"
values:
comments: true # add comments to all blog posts
- -
scope: scope:
path: "" # all files path: "" # all files

View File

@ -21,5 +21,10 @@ layout: default
<div class="row"> <div class="row">
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1"> <div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
{{ content }} {{ content }}
{% if page.comments %}
<div class="disqus-comments">
{% include disqus.html %}
</div>
{% endif %}
</div> </div>
</div> </div>

View File

@ -41,8 +41,10 @@ layout: default
</div> </div>
</div> </div>
<div class="row blog-comments"> {% if page.comments %}
<div class="row disqus-comments">
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1"> <div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
{% include disqus.html %} {% include disqus.html %}
</div> </div>
</div> </div>
{% endif %}

View File

@ -77,6 +77,16 @@ img::-moz-selection {
background: transparent; background: transparent;
} }
.disqus-comments {
margin-top: 30px;
}
@media only screen and (min-width: 768px) {
.disqus-comments {
margin-top: 40px;
}
}
/* --- Navbar --- */ /* --- Navbar --- */
.navbar-custom { .navbar-custom {
@ -322,16 +332,6 @@ header.header-post .post-heading .post-subheading {
border-bottom-left-radius: 5px; border-bottom-left-radius: 5px;
} }
.blog-comments {
margin-top: 30px;
}
@media only screen and (min-width: 768px) {
.blog-comments {
margin-top: 40px;
}
}
/* --- Pager --- */ /* --- Pager --- */
.pager li a { .pager li a {