lib/middleman-blog-drafts/commands/publish.rb in middleman-blog-drafts-0.0.2 vs lib/middleman-blog-drafts/commands/publish.rb in middleman-blog-drafts-0.1.0

- old
+ new

@@ -41,10 +41,10 @@ sub(':month', @date.month.to_s.rjust(2,'0')). sub(':day', @date.day.to_s.rjust(2,'0')). sub(':title', @slug) article_path = File.join(shared_instance.source_dir, article_path + extension) - data, content = shared_instance.frontmatter_manager.data(draft_path) + data, content = shared_instance.extensions[:frontmatter].data(draft_path) data = data.dup.tap { |d| d[:date] = Date.parse @date.strftime('%F') } create_file article_path, "#{YAML::dump(data).sub(/^--- !ruby.*$/, '---')}---\n#{content}" remove_file draft_path else