Skip to content

Commit

Permalink
Add support for collections_dir configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
ashmaroli committed Oct 8, 2018
1 parent 2d098d7 commit ad6e38d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion lib/jekyll-compose/arg_parser.rb
Expand Up @@ -31,7 +31,8 @@ def force?
end

def source
config["source"].gsub(%r!^#{Regexp.quote(Dir.pwd)}!, "")
File.join(config["source"], config["collections_dir"])
.gsub(%r!^#{Regexp.quote(Dir.pwd)}/*!, "")
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion lib/jekyll-compose/file_creator.rb
Expand Up @@ -29,7 +29,7 @@ def validate_should_write!

def ensure_directory_exists
dir = File.dirname file_path
Dir.mkdir(dir) unless Dir.exist?(dir)
FileUtils.mkdir_p(dir) unless Dir.exist?(dir)
end

def write_file
Expand Down

0 comments on commit ad6e38d

Please sign in to comment.