Class: Jekyll::Post

Inherits:
Object
  • Object
show all
Defined in:
lib/jekyll-page-hooks.rb

Overview

Monkey patch for the Jekyll Post class. For the original class, see: github.com/mojombo/jekyll/blob/master/lib/jekyll/post.rb

Instance Method Summary collapse

Instance Method Details

#old_writeObject

Copy the #write method to #old_write, so we can redefine #write method.



52
# File 'lib/jekyll-page-hooks.rb', line 52

alias_method :old_write, :write

#write(dest) ⇒ Object

Write the generated post file to the destination directory. It then calls any post_write methods that may exist.

+dest+ is the String path to the destination dir

Returns nothing



59
60
61
62
# File 'lib/jekyll-page-hooks.rb', line 59

def write(dest)
  old_write(dest)
  post_write if respond_to?(:post_write)
end