Replies: 2 comments
-
Not sure if it helps here, but with rest parameters like |
Beta Was this translation helpful? Give feedback.
-
@delucis I did some tests (on astro 1.6.7) and it seems like pagination with rest params is already working the way I described out of the box. To be clear (for anyone who stumbles on this thread), take the pagination example from the docs, change filename [page].astro to [...page].astro and the built in paginate() function outputs undefined for page 1 - thus /blog and blog/2, with next/prev all functional. |
Beta Was this translation helpful? Give feedback.
-
Astro has built in pagination support
However, I don't want my first page to be
/blog/1
, I rather it be just/blog
I'm not seeing any nice/clean way to do.
One option:
BlogPage(page)
that is used inblog/[page].astro
and also inblog/index.astro
page
object to send to toBlogPage()
inblog/index.astro
... would be nice to be able to do something likepage = Astro.paginate(data, pageCount).page(1)
Thoughts? Did I miss something in the docs?
Beta Was this translation helpful? Give feedback.
All reactions