diff --git a/app/middlewares/rack/clean_path.rb b/app/middlewares/rack/clean_path.rb index a134ec7f3..d171def9f 100644 --- a/app/middlewares/rack/clean_path.rb +++ b/app/middlewares/rack/clean_path.rb @@ -77,7 +77,7 @@ def redirect location end def exit_early? - @req.path == '/' || @req.path.starts_with?('/assets') + @req.path == '/' || @req.path.starts_with?('/assets') || @req.path.include?('sitemap') end # get path before Unicode character got smooshed into it diff --git a/config/sitemap.rb b/config/sitemap.rb index 3dde26825..61693ee72 100644 --- a/config/sitemap.rb +++ b/config/sitemap.rb @@ -24,6 +24,9 @@ add_to_index "/categories/#{category.slug}/feed/" end + # TODO: audit this + # TODO: add /languages pages + # TODO: add locale /subdomains? static_paths = [ '/about/', '/arts/submission-guidelines', @@ -49,6 +52,7 @@ '/watch/' ] + # TODO: read this from app data tce_languages = %w[ czech deutsch @@ -87,6 +91,7 @@ add "/#{year}/" end + # TODO: only published ones [Book, Episode, Page, Podcast, Video, Zine, Journal, Issue, Episode, Poster, Sticker, Logo].each do |model| model.find_each do |page| add page.path, lastmod: page.updated_at