Sha256: f1f10c610287e842047aaee67d520af7ac987ec19b81eaeb713a25a63276a934

Contents?: true

Size: 480 Bytes

Versions: 1

Compression:

Stored size: 480 Bytes

Contents

require 'middleman-core'
require 'middleman-search/search-index-resource'

module Middleman
  class SearchExtension < Middleman::Extension
    option :resources, [], 'Paths of resources to index'
    option :fields, {}, 'Fields to index, with their options'

    def manipulate_resource_list(resources)
      index_file_path = 'index.json'
      resources.push Middleman::Sitemap::SearchIndexResource.new(@app.sitemap, index_file_path, @options)
      resources
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
middleman-search-0.0.1 lib/middleman-search/extension.rb