Skip to content

Commit 6f52666

Browse files
authored
Shorten pagination (#12408)
This reduces the amount of pages shown by default. <img width="439" height="93" alt="Screenshot 2025-08-14 at 7 08 47 PM" src="https://github.com/user-attachments/assets/d2ae805a-1059-4f0f-b7dc-468b4458770e" /> <img width="492" height="81" alt="Screenshot 2025-08-14 at 7 08 51 PM" src="https://github.com/user-attachments/assets/6b2e1cd4-8980-4408-9c73-6499fefc5f59" /> <img width="486" height="76" alt="Screenshot 2025-08-14 at 7 08 58 PM" src="https://github.com/user-attachments/assets/bd4239f8-a157-42cf-ac64-49316f69fadc" />
1 parent d589faf commit 6f52666

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

readthedocs/settings/base.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,11 @@ def SHOW_DEBUG_TOOLBAR(self):
128128
SECURE_REFERRER_POLICY = "strict-origin-when-cross-origin"
129129
X_FRAME_OPTIONS = "DENY"
130130

131+
# Pagination
132+
# Only show 1 page on either side of the current page
133+
PAGINATION_DEFAULT_WINDOW = 1
134+
# Only show 1 page at the beginning and end
135+
PAGINATION_DEFAULT_MARGIN = 1
131136

132137
# Read the Docs
133138
READ_THE_DOCS_EXTENSIONS = ext

0 commit comments

Comments
 (0)