sibanu_web/public/assets/vendor/jekyll/script/console
2022-08-20 13:21:23 +07:00

39 lines
790 B
Ruby

#!/usr/bin/env ruby
require 'pry'
$LOAD_PATH.unshift File.join(File.dirname(__FILE__), *%w{ .. lib })
require 'jekyll'
TEST_DIR = File.expand_path(File.join(File.dirname(__FILE__), *%w{ .. test }))
def fixture_site(overrides = {})
Jekyll::Site.new(site_configuration(overrides))
end
def build_configs(overrides, base_hash = Jekyll::Configuration::DEFAULTS)
Jekyll::Utils.deep_merge_hashes(base_hash, overrides)
end
def site_configuration(overrides = {})
build_configs({
"source" => source_dir,
"destination" => dest_dir
}, build_configs(overrides))
end
def dest_dir(*subdirs)
test_dir('dest', *subdirs)
end
def source_dir(*subdirs)
test_dir('source', *subdirs)
end
def test_dir(*subdirs)
File.join(TEST_DIR, *subdirs)
end
module Jekyll
binding.pry
end