chore(blog): refactor blog Content, remove useless blogListPaginated attribute#11562
Merged
chore(blog): refactor blog Content, remove useless blogListPaginated attribute#11562
blogListPaginated attribute#11562Conversation
✅ [V2]
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
Size Change: +263 B (0%) Total Size: 11.8 MB ℹ️ View Unchanged
|
⚡️ Lighthouse report for the deploy preview of this PR
|
|
Size Change: +253 B (0%) Total Size: 12.3 MB ℹ️ View Unchanged
|
|
The latest updates on your projects. Learn more about Argos notifications ↗︎
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
The
blogListPaginateddoesn't need to be part of the blog content; it can be computed when creating blog routes, similarly to other paginated routes.We don't need this attribute to translate the title/description of the pages either; we can simply translate the blog title/description instead.
Breaking chance?
I'm considering the removal of this
blogListPaginatedattribute from the blog-loaded content as a non-breaking change, considering it has never been documented, and I don't see why anyone would use it.It is possible that this removal breaks the code of plugins that try to extend our blog plugin (which we don't officially support yet btw, cf #4138).
If this causes trouble in the ecosystem (for example, a widely used plugin breaking), we could re-add the attribute for retrocompatibility. However, I'd rather take the risk of removing it and see if anyone complains first.
Note that in any case, this attribute should be gone in V4, so if you have a custom plugin that breaks, it is better to remove usage of
blogListPaginatedimmediately.Test Plan
CI + argos + local tests for i18n
Test links
https://deploy-preview-11562--docusaurus-2.netlify.app/