Sha256: 92485f6e6566853d7c715a135f1a64885a60b49326961ed0e191893f2bb3ee67

Contents?: true

Size: 504 Bytes

Versions: 1

Compression:

Stored size: 504 Bytes

Contents

module Octopress
  module Docs
    class DocsSiteHook < Octopress::Hooks::Site
      def post_read(site)
        if ENV['OCTOPRESS_DOCS'] && Octopress.site.nil?
          Octopress.site = site
        end
      end
      
      def pre_render(site)
        if ENV['OCTOPRESS_DOCS']
          site.pages.concat Octopress::Docs.pages
        end
      end

      def merge_payload(payload, site)
        if ENV['OCTOPRESS_DOCS']
          Octopress::Docs.pages_info
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
octopress-docs-0.0.11 lib/octopress-docs/hooks.rb