Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(blog-plugin): limit option for blog feedOptions #9189

Merged
merged 3 commits into from Aug 3, 2023

Conversation

johnnyreilly
Copy link
Contributor

@johnnyreilly johnnyreilly commented Jul 31, 2023

Breaking change

With Docusaurus v3, the blog feeds are now limited to the last 20 items by default

This permits ensuring the feeds keep a reasonable max size and ensure by default feed reader apps and SaaS are able to read that feed successfully.

If you want to revert to the old Docusaurus v2unlimited behavior, use limit: false

Note: if you use the createFeedItems() hook, the items you receive have already been limited (by default to 20). You might need to turn off this behavior for advanced createFeedItems() customizations involving access to the whole list of blog posts.

Pre-flight checklist

Motivation

To make limiting the size of a blog feed straightforward and the default behaviour.

Test Plan

Test links

Deploy preview:

Related issues/PRs

#8378

@netlify
Copy link

netlify bot commented Jul 31, 2023

[V2]

Built without sensitive environment variables

Name Link
🔨 Latest commit 9b75dbf
🔍 Latest deploy log https://app.netlify.com/sites/docusaurus-2/deploys/64c75587952beb00076c86b5
😎 Deploy Preview https://deploy-preview-9189--docusaurus-2.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@github-actions
Copy link

⚡️ Lighthouse report for the deploy preview of this PR

URL Performance Accessibility Best Practices SEO PWA Report
/ 🟠 68 🟢 97 🟠 83 🟢 100 🟠 89 Report
/docs/installation 🟠 73 🟢 100 🟠 83 🟢 100 🟠 89 Report

@slorber slorber added pr: new feature This PR adds a new API or behavior. pr: breaking change Existing sites may not build successfully in the new version. Description contains more details. labels Aug 3, 2023
@slorber
Copy link
Collaborator

slorber commented Aug 3, 2023

LGTM thanks 👍

My only concern is that I hope it's clear that the limit behavior is applied before the createFeedItems, because now we somehow have 2 ways to limit the feed. I guess if this becomes a problem we can recommend users of the createFeedItems to turn off the default limit so that they can fully customize the final feed through createFeedItems

@slorber slorber changed the title feat: limit option for blog feedOptions feat(blog-plugin): limit option for blog feedOptions Aug 3, 2023
@slorber slorber merged commit 4ecc86f into facebook:main Aug 3, 2023
31 of 32 checks passed
slorber pushed a commit to VinceCYLiao/docusaurus that referenced this pull request Aug 3, 2023
@johnnyreilly johnnyreilly deleted the feed-limit branch August 9, 2023 18:51
This was referenced Oct 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Signed Facebook CLA pr: breaking change Existing sites may not build successfully in the new version. Description contains more details. pr: new feature This PR adds a new API or behavior.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Blog feed: add a first-class API to limit size of the RSS / Atom feeds
3 participants