-
-
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
Fix: Not generating RSS feed on blog plugin #5846
Conversation
when there where posts 0 is falsy, where any other number is truthy. Therefore if there where, say 5 blogposts, then the length would be falsey and would skip generating blog feed files. I made the check more intention revealing. Knowing that `.length` returns a number, then `==` shoudl sufice to cehck equality.
Hi @jazcarate! Thank you for your pull request and welcome to our community. Action RequiredIn order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you. ProcessIn order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA. Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with If you have received this in error or have any questions, please contact us at cla@fb.com. Thanks! |
✔️ [V2] 🔨 Explore the source changes: 326890f 🔍 Inspect the deploy log: https://app.netlify.com/sites/docusaurus-2/deploys/617ebdd59593f100077298e1 😎 Browse the preview: https://deploy-preview-5846--docusaurus-2.netlify.app |
⚡️ Lighthouse report for the changes in this PR:
Lighthouse ran on https://deploy-preview-5846--docusaurus-2.netlify.app/ |
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks! |
1 similar comment
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks! |
@jazcarate we are aware of this problem (and we have already PR #5835 to fix it), so we will release new version soon. Therefore I'm closing your PR but thanks for your efforts. |
Motivation
Recently (29d1335#diff-635b297894f2ee11773eececd176e7103bbf55146b368d017449eb6c661b4492L524) the check to see if there were blog posts to generate the feed got broken.
As
0
is falsely, where any other number is truthy. Therefore if there where, say 5 blogposts, then the length would be falsely and would skip generating blog feed files.I made the check more intention revealing. Knowing that
.length
returns a number, then==
should suffice to check equality.Test Plan
I build https://github.com/yangshun/tech-interview-handbook without this change, and there was not
rss.xml
.I made the change,
yarn link
ed this change. Rebuild, and now I see therss.xml
feed.