Sha256: 265ba5dcfb354f56db0ff4ed36bc3b318fd813ecb18f676e390d041cf8d02d47
Contents?: true
Size: 988 Bytes
Versions: 4
Compression:
Stored size: 988 Bytes
Contents
require 'middleman-blog-drafts/helpers' module Middleman module Blog class DraftsExtension < ::Middleman::Extension self.supports_multiple_instances = false option :sources, 'drafts/{title}.html', 'Pattern for matching draft articles (no template extensions)' option :permalink, '/drafts/{title}.html', 'Path draft are served from' option :build, false, 'Whether to include drafts when building the site' self.defined_helpers = [ ::Middleman::Blog::Drafts::Helpers ] def initialize(app, options_hash={}, &block) super end def after_configuration require 'middleman-blog/blog_data' require 'middleman-blog-drafts/blog_data_extensions' ::Middleman::Blog::BlogData.send :include, Drafts::BlogDataExtensions app.blog.drafts(app, options) app.sitemap.register_resource_list_manipulator(:blog_drafts, app.blog.drafts, false) end end end end
Version data entries
4 entries across 4 versions & 1 rubygems