Module: Plate::Callbacks
Overview
Callbacks are used to extend the base functionality of Plate. You might want to create some dynamic pages after all posts have been loaded (such as a blog archives view) or clean up some page output after it is rendered but before it is written to disk. Callbacks are the best way to achieve these and other common use cases.
Callbacks must be registered with an object to be used. If you generated a new site using the ‘plate new .` or `platify` command, you should see an example callbacks file in `lib/callbacks.rb`.
Defined Under Namespace
Modules: ClassMethods, InstanceMethods
Class Method Summary collapse
Class Method Details
.included(base) ⇒ Object
12 13 14 15 |
# File 'lib/plate/callbacks.rb', line 12 def self.included(base) base.send(:include, InstanceMethods) base.send(:extend, ClassMethods) end |