lib/middleman-somemoji/extension.rb in middleman-somemoji-0.1.0 vs lib/middleman-somemoji/extension.rb in middleman-somemoji-0.2.0

- old
+ new

@@ -9,17 +9,14 @@ option :emoji_class, 'emoji', %[<img> tag class (default is 'emoji')] option :emojis_dir, '/images/emoji', %[Emoji images directory path (default is '/images/emoji')] def initialize(app, options_hash={}, &block) super - - require 'somemoji' - @options = options + end - app.before_render do |body, path, locs, template_class| - ::Middleman::Somemoji::Converter.new(body, @options).convert - end + def after_build(builder) + ::Middleman::Somemoji::Converter.new(@options).convert(app) end end end end