mirror of
https://github.com/jekyll/jekyll.git
synced 2026-04-06 03:01:43 -04:00
OMG COLLECTIONS ARE RENDERING CALL THE POLICE
This commit is contained in:
38
script/console
Executable file
38
script/console
Executable file
@@ -0,0 +1,38 @@
|
||||
#!/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
|
||||
Reference in New Issue
Block a user