diff --git a/middleman-core/lib/middleman-core/sitemap/page.rb b/middleman-core/lib/middleman-core/sitemap/page.rb index 730089e7..a3e1b3f9 100644 --- a/middleman-core/lib/middleman-core/sitemap/page.rb +++ b/middleman-core/lib/middleman-core/sitemap/page.rb @@ -11,19 +11,16 @@ module Middleman::Sitemap # @return [String] attr_accessor :path - # @return [Middleman::Sitemap::Page] + # The path of the page this page is proxied to, or nil if it's not proxied. + # @return [String] attr_accessor :proxied_to - # @return [Symbol] - attr_accessor :status - # Initialize page with parent store and URL # @param [Middleman::Sitemap::Store] store # @param [String] path def initialize(store, path) @store = store @path = path - @status = :generic @source_file = nil @proxied_to = nil end @@ -83,30 +80,16 @@ module Middleman::Sitemap # Whether this page is a proxy # @return [Boolean] def proxy? - @status == :proxy + !!@proxied_to end # Set this page to proxy to a target path # @param [String] target # @return [void] def proxy_to(target) - @status = :proxy @proxied_to = target end - # Whether this page is a generic page - # @return [Boolean] - def generic? - @status == :generic - end - - # Set this page to be a generic page - # @return [void] - def make_generic - @status = :generic - # TODO: Remove from ignore array? - end - # Whether this page is ignored # @return [Boolean] def ignored? diff --git a/middleman-core/lib/middleman-core/sitemap/store.rb b/middleman-core/lib/middleman-core/sitemap/store.rb index 80226c87..07b9662a 100644 --- a/middleman-core/lib/middleman-core/sitemap/store.rb +++ b/middleman-core/lib/middleman-core/sitemap/store.rb @@ -91,6 +91,8 @@ module Middleman::Sitemap end # Find a page given its destination path + # @param [String] The destination (output) path of a page. + # @return [Middleman::Sitemap::Page] def page_by_destination(destination_path) # TODO: memoize this destination_path = normalize_path(destination_path) @@ -156,14 +158,6 @@ module Middleman::Sitemap true end - # Whether the sitemap should completely ignore a given file/path - # @param [String] file - # @param [String] path - # @return [Boolean] - def sitemap_should_ignore?(file, path) - @app.sitemap_ignore.every(&:call) - end - protected # Get a path without templating extensions diff --git a/middleman-more/lib/middleman-more.rb b/middleman-more/lib/middleman-more.rb index 1bde2947..f763fed4 100644 --- a/middleman-more/lib/middleman-more.rb +++ b/middleman-more/lib/middleman-more.rb @@ -25,7 +25,7 @@ module Middleman autoload :Sprockets, "middleman-more/core_extensions/sprockets" end - # User-activatable extendions + # User-activatable extensions module Extensions # RelativeAssets allow any asset path in dynamic templates to be either # relative to the root of the project or use an absolute URL.