Sha256: 3bed242460488f60623380711bf2a2662e165c5052b8f63f86fe784c91aa04cd
Contents?: true
Size: 422 Bytes
Versions: 25
Compression:
Stored size: 422 Bytes
Contents
module Jekyll class Publisher def initialize(site) @site = site end def publish?(thing) can_be_published?(thing) && !hidden_in_the_future?(thing) end private def can_be_published?(thing) thing.data.fetch('published', true) || @site.unpublished end def hidden_in_the_future?(thing) thing.is_a?(Post) && !@site.future && thing.date > @site.time end end end
Version data entries
25 entries across 25 versions & 1 rubygems