diff --git a/middleman-core/lib/middleman-core/sitemap/page.rb b/middleman-core/lib/middleman-core/sitemap/page.rb index 8a8fab81..33af034e 100644 --- a/middleman-core/lib/middleman-core/sitemap/page.rb +++ b/middleman-core/lib/middleman-core/sitemap/page.rb @@ -6,6 +6,8 @@ module Middleman::Sitemap # @return [Middleman::Sitemap::Store] attr_accessor :store + # The source path of this page (relative to the source directory, + # without template extensions) # @return [String] attr_accessor :path @@ -263,4 +265,4 @@ module Middleman::Sitemap store.app end end -end \ No newline at end of file +end diff --git a/middleman-core/lib/middleman-core/sitemap/store.rb b/middleman-core/lib/middleman-core/sitemap/store.rb index 8ff847b8..f7f96abf 100644 --- a/middleman-core/lib/middleman-core/sitemap/store.rb +++ b/middleman-core/lib/middleman-core/sitemap/store.rb @@ -2,6 +2,11 @@ module Middleman::Sitemap # The Store class + # + # The Store manages a collection of Page objects, which represent + # individual items in the sitemap. Pages are indexed by "source path", + # which is the path relative to the source directory, minus any template + # extensions. All "path" parameters used in this class are source paths. class Store # @return [Middleman::Base] @@ -26,7 +31,7 @@ module Middleman::Sitemap end # Ignore a path or add an ignore callback - # @param [String, Regexp] path + # @param [String, Regexp] path, path glob expression, or path regex # @return [void] def ignore(path=nil, &block) if !path.nil? && path.include?("*") @@ -60,6 +65,7 @@ module Middleman::Sitemap end # Loop over known pages + # @yield [path, page] # @return [void] def each @pages.each do |k, v|