framework icon indicating copy to clipboard operation
framework copied to clipboard

skip appending page=1 in pagination URLs

Open safaeean opened this issue 7 months ago • 1 comments

feat(pagination): omit ?page=1 and prevent dangling separators

Skip adding the page query parameter when the requested page equals 1, returning the canonical base path instead.

When no extra query parameters are present, the function now suppresses the ? / & separator entirely. This prevents URLs such as /users? or /users& and avoids duplicate‑content issues for the first page.

Behaviour for pages >1 and for existing custom query strings is unchanged.

safaeean avatar May 18 '25 21:05 safaeean

Mark as draft since test are failing.

crynobone avatar May 19 '25 08:05 crynobone