Repository navigation
Add base to paginate - #11253
Add base to paginate#11253
Conversation
🦋 Changeset detectedLatest commit: d840819 The changes in this PR will be included in the next version bump. Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
There's no changeset, but presumably this would be a major as existing users would've manually added the base now, and we might break them? |
|
But isn't this a bug? Users were using a workaround for the bug. Or do we document that those URLs were meant to be without base? |
|
@ematipico The docs doesn't explicit mention about the base. I think it has always worked this way for very long and it's risky to fix it now even if it may be a bug. I was thinking of documenting that you need to add the base manually. Or maybe |
Yeah, that sounds like a reasonable approach! |
|
I am leaning towards the most simple solution to just edit docs and mention that base is not prepended by default. If it's okay with everyone, I will close the PR an open one in docs. Thanks for all the support @bluwy and @ematipico |
Make sure to not delete the branch. We will recreate this PR once we start the works towards Astro 5.0 |
cbe8438 to
6c54fbd
Compare
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
|
@sarah11918 Code snippet added here |
|
Quick reminder (as will be the process going forward) that this will require an update to the @kevinzunigacuellar is a maintainer, so can commit directly there. But, might not make the obvious connection to the Linear task. So especially @ematipico and @bluwy whom I suspect will be helping out a lot with non-core PRs, please help everyone out who doesn't use Linear! 🙌 |
delucis
left a comment
There was a problem hiding this comment.
Thanks for the PR @kevinzunigacuellar!
How does this change impact pages not directly in src/pages/?
As an example:
- I have
base: "blog"in my config - I have
src/pages/categories/[...category].astrowhich usespaginate()
The correct inclusion of base would be /blog/categories/2.
Does this PR do that or does it generate /categores/blog/2?
|
Noting that the place to update this information in the upgrade guide is here: Preview: https://5-0-0-beta--astro-docs-2.netlify.app/en/guides/upgrade-to/v5/#changed-add-base-to-paginate-plt2204 Will also require an update to: |
|
@kevinzunigacuellar Does this also affect Note: I think first and last are very recent additions, maybe even before you made this PR! |
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
The |
|
@sarah11918 I updated the changeset to include all the APIs that were modified |
delucis
left a comment
There was a problem hiding this comment.
The
baseis always prefixed to any route, regardless of their position the file system. In your example, the emitted route is/blog/categories/2
Fantastic, thanks for the clarification @ematipico. In that case approving conceptually 😁
Thanks again for the PR @kevinzunigacuellar and for taking it to the finish line Ema 💜
Changes
paginate()Testing
Updated tests
Docs
withastro/docs#8569withastro/docs#9200