feat: product list pagination 20/page (was 100, all 48 fit on one page)
Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
+1
-1
@@ -322,7 +322,7 @@ def build(site_id,mirror=False):
|
|||||||
totals+=1
|
totals+=1
|
||||||
# Static pagination: large product collections must not embed 5,000 cards
|
# Static pagination: large product collections must not embed 5,000 cards
|
||||||
# in one HTML page. Every item remains reachable, including in the sitemap.
|
# in one HTML page. Every item remains reachable, including in the sitemap.
|
||||||
LIST_PAGE_SIZE=100
|
LIST_PAGE_SIZE=20
|
||||||
def render_paginated(page,items):
|
def render_paginated(page,items):
|
||||||
root_route=page['route'].rstrip('/')+'/'
|
root_route=page['route'].rstrip('/')+'/'
|
||||||
pages=max(1,(len(items)+LIST_PAGE_SIZE-1)//LIST_PAGE_SIZE)
|
pages=max(1,(len(items)+LIST_PAGE_SIZE-1)//LIST_PAGE_SIZE)
|
||||||
|
|||||||
Reference in New Issue
Block a user