-
-
Notifications
You must be signed in to change notification settings - Fork 8.5k
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
V2: Enable feeds by default in blog plugin #3720
Comments
Why not having a feed by default, but it's a breaking change. Good first issue |
Hi, I'm interested in taking on this feature if that's okay :) |
yes thanks |
Me and @cindygu4 are working on this feature. |
I believe you can implement this by changing the Joi
Generating the site should get you |
yes changing the Joi default value could be enough. you can test it with unit tests: missing blog feed config leads to rss+atom |
@slorber If its the former, how would we change feedOptions.type so we don't receive any validation errors? If its the latter, how would we approach this? |
Hi @slorber, @vikhramt007 and I wrote a unit test for this feature as shown below: We ended up doing so that type accepts an empty string parameter, Thanks! |
Hi, It would be easier for me to understand what's your problem if you had a draft PR opened where I could inspect a code diff "" is not really a value we should accept We should allow type: null undefined (= type: "all") If other tests say something else, you should change these other tests so that they conform to what we actually want.
Afaik it's only a shortcut in the schema, after normalization of options, you can't end up with a type: "all" code, so it's only in the Joi declaration file:
I merged this morning many changes so you'd rather update your branch asap to sync with recent code. |
Hi @slorber, Thank you for your help! It really helped clear up our understanding. We've been able to implement this feature and made a pull request a little bit ago :) |
closed by #3842 |
🚀 Feature
The blog plugin should enable feeds by default.
Motivation
Docusaurus 1 enables both blogs and feeds by default. Docusaurus 2 extracts the blog into a separate plugin so it makes sense that blogs aren't enabled by default, however I would expect feeds to also be enabled by default with the blog plugin.
Additionally, feeds would be useful to most users as it's unlikely that blogs would be monetized for commercial purposes (see #3719 for more rationale).
Pitch
The blog plugin should behave as if
feedOptions: { type: 'all' }
was in the configuration by defaultThe text was updated successfully, but these errors were encountered: