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

Fix: Not generating RSS feed on blog plugin #5846

Closed
wants to merge 1 commit into from
Closed

Fix: Not generating RSS feed on blog plugin #5846

wants to merge 1 commit into from

Conversation

jazcarate
Copy link

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 linked this change. Rebuild, and now I see the rss.xml feed.

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.
@facebook-github-bot
Copy link
Contributor

Hi @jazcarate!

Thank you for your pull request and welcome to our community.

Action Required

In 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.

Process

In 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 CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at cla@fb.com. Thanks!

@netlify
Copy link

netlify bot commented Oct 31, 2021

✔️ [V2]
Built without sensitive environment variables

🔨 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

@github-actions
Copy link

⚡️ Lighthouse report for the changes in this PR:

Category Score
🟠 Performance 84
🟢 Accessibility 98
🟢 Best practices 100
🟢 SEO 100
🟢 PWA 95

Lighthouse ran on https://deploy-preview-5846--docusaurus-2.netlify.app/

@facebook-github-bot facebook-github-bot added the CLA Signed Signed Facebook CLA label Oct 31, 2021
@facebook-github-bot
Copy link
Contributor

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
@facebook-github-bot
Copy link
Contributor

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!

@lex111
Copy link
Contributor

lex111 commented Oct 31, 2021

@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.

@lex111 lex111 closed this Oct 31, 2021
@jazcarate jazcarate deleted the bugfix/not-generating-rss branch October 31, 2021 21:09
@Josh-Cena Josh-Cena added the closed: duplicate This issue or pull request already exists in another issue or pull request label Nov 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Signed Facebook CLA closed: duplicate This issue or pull request already exists in another issue or pull request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants