Clarify in the documentation what "path" means for Sitemap::Store and Sitemap::Page
This commit is contained in:
parent
2eec7e11ba
commit
a41bf57f2d
|
@ -6,6 +6,8 @@ module Middleman::Sitemap
|
||||||
# @return [Middleman::Sitemap::Store]
|
# @return [Middleman::Sitemap::Store]
|
||||||
attr_accessor :store
|
attr_accessor :store
|
||||||
|
|
||||||
|
# The source path of this page (relative to the source directory,
|
||||||
|
# without template extensions)
|
||||||
# @return [String]
|
# @return [String]
|
||||||
attr_accessor :path
|
attr_accessor :path
|
||||||
|
|
||||||
|
@ -263,4 +265,4 @@ module Middleman::Sitemap
|
||||||
store.app
|
store.app
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -2,6 +2,11 @@
|
||||||
module Middleman::Sitemap
|
module Middleman::Sitemap
|
||||||
|
|
||||||
# The Store class
|
# 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
|
class Store
|
||||||
|
|
||||||
# @return [Middleman::Base]
|
# @return [Middleman::Base]
|
||||||
|
@ -26,7 +31,7 @@ module Middleman::Sitemap
|
||||||
end
|
end
|
||||||
|
|
||||||
# Ignore a path or add an ignore callback
|
# Ignore a path or add an ignore callback
|
||||||
# @param [String, Regexp] path
|
# @param [String, Regexp] path, path glob expression, or path regex
|
||||||
# @return [void]
|
# @return [void]
|
||||||
def ignore(path=nil, &block)
|
def ignore(path=nil, &block)
|
||||||
if !path.nil? && path.include?("*")
|
if !path.nil? && path.include?("*")
|
||||||
|
@ -60,6 +65,7 @@ module Middleman::Sitemap
|
||||||
end
|
end
|
||||||
|
|
||||||
# Loop over known pages
|
# Loop over known pages
|
||||||
|
# @yield [path, page]
|
||||||
# @return [void]
|
# @return [void]
|
||||||
def each
|
def each
|
||||||
@pages.each do |k, v|
|
@pages.each do |k, v|
|
||||||
|
|
Loading…
Reference in a new issue