diff --git a/kjvstudy_org/routes/utility.py b/kjvstudy_org/routes/utility.py index aa5a5ca..d0730c0 100644 --- a/kjvstudy_org/routes/utility.py +++ b/kjvstudy_org/routes/utility.py @@ -346,8 +346,8 @@ def sitemap(): """ - # Add all chapter URLs and verse URLs for each book - chapters = [ch for bk, ch in bible.iter_chapters() if bk == book] + # Add all chapter URLs for each book + chapters = bible.get_chapters_for_book(book) for chapter in chapters: sitemap_xml += f""" {base_url}/book/{book}/chapter/{chapter} @@ -364,17 +364,9 @@ def sitemap(): 0.5 """ - - # Add all verse URLs for this chapter - verses = [v for v in bible.iter_verses() if v.book == book and v.chapter == chapter] - for verse_num in range(1, len(verses) + 1): - sitemap_xml += f""" - {base_url}/book/{book}/chapter/{chapter}/verse/{verse_num} - {current_date} - yearly - 0.5 - -""" + # Note: Individual verse URLs (31,102 total) are excluded from sitemap + # to keep it under Google's 50,000 URL limit and improve generation speed. + # Google will discover verse pages through internal links on chapter pages. sitemap_xml += ""