diff --git a/lib/jekyll/convertible.rb b/lib/jekyll/convertible.rb index dad0b163..015f88b3 100644 --- a/lib/jekyll/convertible.rb +++ b/lib/jekyll/convertible.rb @@ -118,5 +118,18 @@ module Jekyll end end end + + # Write the generated page file to the destination directory. + # + # dest - The String path to the destination dir. + # + # Returns nothing. + def write(dest) + path = destination(dest) + FileUtils.mkdir_p(File.dirname(path)) + File.open(path, 'w') do |f| + f.write(self.output) + end + end end end diff --git a/lib/jekyll/page.rb b/lib/jekyll/page.rb index 4c434564..2f7803d5 100644 --- a/lib/jekyll/page.rb +++ b/lib/jekyll/page.rb @@ -129,19 +129,6 @@ module Jekyll path end - # Write the generated page file to the destination directory. - # - # dest - The String path to the destination dir. - # - # Returns nothing. - def write(dest) - path = destination(dest) - FileUtils.mkdir_p(File.dirname(path)) - File.open(path, 'w') do |f| - f.write(self.output) - end - end - # Returns the object as a debug String. def inspect "#" diff --git a/lib/jekyll/post.rb b/lib/jekyll/post.rb index c210d235..a7afa800 100644 --- a/lib/jekyll/post.rb +++ b/lib/jekyll/post.rb @@ -258,19 +258,6 @@ module Jekyll path end - # Write the generated post file to the destination directory. - # - # dest - The String path to the destination dir. - # - # Returns nothing. - def write(dest) - path = destination(dest) - FileUtils.mkdir_p(File.dirname(path)) - File.open(path, 'w') do |f| - f.write(self.output) - end - end - # Convert this post into a Hash for use in Liquid templates. # # Returns the representative Hash.