Sha256: 8ed4124aa4996634b3cdd476233324fbcdb03d52b93189624df71042d4da480a

Contents?: true

Size: 461 Bytes

Versions: 2

Compression:

Stored size: 461 Bytes

Contents

module Octopress
  module Paginate
    class SiteHook < Hooks::Site
      priority :low

      def post_read(site)
        site.pages.select {|p| p.data['paginate'] }.each do |page|
          Octopress::Paginate.paginate(page)
        end
      end
    end

    class PageHook < Hooks::Page
      def merge_payload(payload, page)
        if page.data['paginate']
          Octopress::Paginate.page_payload(payload, page)
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
octopress-paginate-1.2.0 lib/octopress-paginate/hooks.rb
octopress-paginate-1.1.2 lib/octopress-paginate/hooks.rb