Class: Middleman::SearchEngineSitemap::Extension

Inherits:
Extension
  • Object
show all
Defined in:
lib/middleman/search_engine_sitemap.rb

Instance Method Summary collapse

Instance Method Details

#manipulate_resource_list(resources) ⇒ Object



17
18
19
# File 'lib/middleman/search_engine_sitemap.rb', line 17

def manipulate_resource_list(resources)
  resources << sitemap_resource
end

#process_url(url) ⇒ Object



25
26
27
# File 'lib/middleman/search_engine_sitemap.rb', line 25

def process_url(url)
  options.process_url ? options.process_url.call(url) : url
end

#resource_in_sitemap?(resource) ⇒ Boolean

Returns:

  • (Boolean)


21
22
23
# File 'lib/middleman/search_engine_sitemap.rb', line 21

def resource_in_sitemap?(resource)
  is_page?(resource) && not_excluded?(resource)
end