Class: Jekyll::Post
- Inherits:
-
Object
- Object
- Jekyll::Post
- 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
-
#old_write ⇒ Object
Copy the #write method to #old_write, so we can redefine #write method.
-
#write(dest) ⇒ Object
Write the generated post file to the destination directory.
Instance Method Details
#old_write ⇒ Object
Copy the #write method to #old_write, so we can redefine #write method.
50 |
# File 'lib/jekyll-page-hooks.rb', line 50 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
57 58 59 60 |
# File 'lib/jekyll-page-hooks.rb', line 57 def write(dest) old_write(dest) post_write if respond_to?(:post_write) end |