I'm trying add a allstuff
attribute for class Site
like that:
module Jekyll
class Site
def allstuff
return (self.posts + self.pages)
end
def to_liquid(attrs = ATTRIBUTES_FOR_LIQUID)
super(attrs + %w[
allstuff
])
end
end
But when I try to used it in a .html
like that
{% for p in site.allstuff %}...{% endfor %}
It isn't work
I have written puts "eeeeoooo"
in allstuff
function and I have seen that it is never called.
What is the problem?
I have added others liquid attributes for class Post
and class Page
in the same way without any problem. I don't know what is different.