Skip to content

Commit ccb23e6

Browse files
Start to fix sitemap.xml
1 parent 5ca8e0e commit ccb23e6

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

app/middlewares/rack/clean_path.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ def redirect location
7777
end
7878

7979
def exit_early?
80-
@req.path == '/' || @req.path.starts_with?('/assets')
80+
@req.path == '/' || @req.path.starts_with?('/assets') || @req.path.include?('sitemap')
8181
end
8282

8383
# get path before Unicode character got smooshed into it

config/sitemap.rb

+5
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@
2424
add_to_index "/categories/#{category.slug}/feed/"
2525
end
2626

27+
# TODO: audit this
28+
# TODO: add /languages pages
29+
# TODO: add locale /subdomains?
2730
static_paths = [
2831
'/about/',
2932
'/arts/submission-guidelines',
@@ -49,6 +52,7 @@
4952
'/watch/'
5053
]
5154

55+
# TODO: read this from app data
5256
tce_languages = %w[
5357
czech
5458
deutsch
@@ -87,6 +91,7 @@
8791
add "/#{year}/"
8892
end
8993

94+
# TODO: only published ones
9095
[Book, Episode, Page, Podcast, Video, Zine, Journal, Issue, Episode, Poster, Sticker, Logo].each do |model|
9196
model.find_each do |page|
9297
add page.path, lastmod: page.updated_at

0 commit comments

Comments
 (0)