Skip to content

Commit

Permalink
handle non-existent sitemap.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
codylerum committed Jul 7, 2012
1 parent 0c418f3 commit a92c983
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions lib/awestruct/extensions/sitemap.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,13 @@ def initialize
def execute( site )

# Add additional excludes from _config/sitemap.yml

if site.sitemap["excluded_files"]
@excluded_files.merge(site.sitemap.excluded_files)
end
if site.sitemap["excluded_extensions"]
@excluded_extensions.merge(site.sitemap.excluded_extensions)
if site.sitemap
if site.sitemap["excluded_files"]
@excluded_files.merge(site.sitemap.excluded_files)
end
if site.sitemap["excluded_extensions"]
@excluded_extensions.merge(site.sitemap.excluded_extensions)
end
end

# Go through all of the site's pages and add sitemap metadata
Expand Down

0 comments on commit a92c983

Please sign in to comment.