#Pagination – Pagination at "root level"
5 messages · Page 1 of 1 (latest)
Ahh I see, you want to add a base path to the pagination?
I don't think there is any easy ways of doing that but you can modify the array return by the pagination() function before returning it inside getStaticPaths(). Something like this ```ts
// src/pages/[...page].astro
function getStaticPaths({ paginate }) {
const pages = paginate(...)
return pages.map(page => {
params: {
page: '/page' + page.params.page
},
props {
page: // resconstruct page props too
}
})
}
``` page props: https://docs.astro.build/en/guides/routing/#complete-api-reference
what's the pagination() function? did you mean paginate()?
Ya my bad, I just mixed up the names