simplify comment inclusion
parent
cf632eb6b5
commit
85632333ee
|
@ -1,5 +1,5 @@
|
|||
<!-- comments -->
|
||||
<% unless @item[:no_comments] or @item[:is_category] %>
|
||||
<% if @item.comments? or @site.comments? %>
|
||||
<div id="disqus">
|
||||
<div id="disqus_thread"></div>
|
||||
<script type="text/javascript">
|
||||
|
|
|
@ -46,6 +46,10 @@ class Nanoc::Item
|
|||
def root?
|
||||
self.identifier == "/"
|
||||
end
|
||||
|
||||
def comments?
|
||||
!(self[:no_comments] or self[:is_category])
|
||||
end
|
||||
end
|
||||
|
||||
class Category
|
||||
|
@ -165,6 +169,10 @@ class Nanoc::Site
|
|||
items[index + 1]
|
||||
end
|
||||
end
|
||||
|
||||
def comments?
|
||||
!self["disqus_site"].nil?
|
||||
end
|
||||
end
|
||||
|
||||
def category name_or_cat
|
||||
|
|
Loading…
Reference in New Issue