lib/octopress/commands/new.rb in octopress-3.0.0.rc.17 vs lib/octopress/commands/new.rb in octopress-3.0.0.rc.18
- old
+ new
@@ -23,11 +23,11 @@
CommandHelpers.add_page_options c
CommandHelpers.add_common_options c
c.action do |args, options|
options['path'] = args.first
- Page.new(options).write
+ Page.new(CommandHelpers.site(options), options).write
end
end
c.command(:post) do |c|
c.syntax 'post <TITLE> [options]'
@@ -37,11 +37,11 @@
c.option 'dir', '--dir DIR', 'Create post at _posts/DIR/.'
CommandHelpers.add_common_options c
c.action do |args, options|
options['title'] = args.first
- Post.new(options).write
+ Post.new(CommandHelpers.site(options), options).write
end
end
c.command(:draft) do |c|
c.syntax 'draft <TITLE> [options]'
@@ -50,10 +50,10 @@
c.option 'slug', '--slug SLUG', 'Use this slug in filename instead of sluggified post title.'
CommandHelpers.add_common_options c
c.action do |args, options|
options['title'] = args.first
- Draft.new(options).write
+ Draft.new(CommandHelpers.site(options), options).write
end
end
end
end
end