From 5571dc766e2143e39762ff0b47c41d1c2e154f4c Mon Sep 17 00:00:00 2001 From: Benjamin Sanders Date: Sat, 11 Oct 2025 10:34:24 -0400 Subject: Vendor bundled gems for deployment --- .../gems/jekyll-4.4.1/lib/jekyll/publisher.rb | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 vendor/bundle/ruby/3.4.0/gems/jekyll-4.4.1/lib/jekyll/publisher.rb (limited to 'vendor/bundle/ruby/3.4.0/gems/jekyll-4.4.1/lib/jekyll/publisher.rb') diff --git a/vendor/bundle/ruby/3.4.0/gems/jekyll-4.4.1/lib/jekyll/publisher.rb b/vendor/bundle/ruby/3.4.0/gems/jekyll-4.4.1/lib/jekyll/publisher.rb new file mode 100644 index 0000000..26fe4a3 --- /dev/null +++ b/vendor/bundle/ruby/3.4.0/gems/jekyll-4.4.1/lib/jekyll/publisher.rb @@ -0,0 +1,23 @@ +# frozen_string_literal: true + +module Jekyll + class Publisher + def initialize(site) + @site = site + end + + def publish?(thing) + can_be_published?(thing) && !hidden_in_the_future?(thing) + end + + def hidden_in_the_future?(thing) + thing.respond_to?(:date) && !@site.future && thing.date.to_i > @site.time.to_i + end + + private + + def can_be_published?(thing) + thing.data.fetch("published", true) || @site.unpublished + end + end +end -- cgit v1.2.3