Module: Middleman::Sitemap::InstanceMethods

Defined in:
lib/middleman-core/sitemap.rb

Overview

Sitemap instance methods

Instance Method Summary collapse

Instance Method Details

#current_pageMiddleman::Sitemap::Resource

Get the resource object for the current path



70
71
72
# File 'lib/middleman-core/sitemap.rb', line 70

def current_page
  current_resource
end

#current_resourceMiddleman::Sitemap::Resource

Get the resource object for the current path



76
77
78
79
# File 'lib/middleman-core/sitemap.rb', line 76

def current_resource
  return nil unless current_path
  sitemap.find_resource_by_destination_path(current_path)
end

#sitemapMiddleman::Sitemap::Store

Get the sitemap class instance



64
65
66
# File 'lib/middleman-core/sitemap.rb', line 64

def sitemap
  @_sitemap ||= Store.new(self)
end