Clarify in the documentation what "path" means for Sitemap::Store and Sitemap::Page
This commit is contained in:
parent
2eec7e11ba
commit
a41bf57f2d
2 changed files with 10 additions and 2 deletions
|
@ -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
|
||||
end
|
||||
|
|
|
@ -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|
|
||||
|
|
Loading…
Reference in a new issue