Replies: 3 comments 3 replies
-
|
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.
-
|
This is still relevant (@veesahni comment) because I cannot find it in docs. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Astro has built in pagination support
However, I don't want my first page to be
/blog/1, I rather it be just/blogI'm not seeing any nice/clean way to do.
One option:
BlogPage(page)that is used inblog/[page].astroand also inblog/index.astropageobject 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