#Pagination – Pagination at "root level"

5 messages · Page 1 of 1 (latest)

azure harbor
#

You can nest it inside another folder named page like this: src/pages/page/[...page].astro

#

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

torpid yoke
azure harbor