Sha256: 8e318ac84b7dbd4065ee1f46ca266f74f7d3121ea3a5f13b40bc7f89991c8d77
Contents?: true
Size: 374 Bytes
Versions: 5
Compression:
Stored size: 374 Bytes
Contents
extend_view do # Returns all blog posts contained in this directory. We assume # that a blog post is any page object that has a date set. # def blog_posts siblings .select { |p| blog_post?(p) } .sort_by(&:date) .reverse end # Checks if a specific node is a blog post. # def blog_post?(node) node.page? && !node.date.nil? end end
Version data entries
5 entries across 5 versions & 1 rubygems