fix(rss): make title optional if description is provided#9610
fix(rss): make title optional if description is provided#9610ematipico merged 10 commits intowithastro:mainfrom
Conversation
🦋 Changeset detectedLatest commit: 1666e75 The changes in this PR will be included in the next version bump. Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
Seems like there's a test that see if we throw an error on title, should probably be removed! |
Co-authored-by: Erika <3019731+Princesseuh@users.noreply.github.com>
Co-authored-by: Erika <3019731+Princesseuh@users.noreply.github.com>
|
Following #9577 (comment), could we also make astro/packages/astro-rss/src/index.ts Lines 117 to 123 in 2814984 And possibly handling for undefined astro/packages/astro-rss/src/index.ts Lines 212 to 221 in 2814984 |
| ? result.link | ||
| : createCanonicalURL(result.link, rssOptions.trailingSlash, site).href; | ||
| item.link = itemLink; | ||
| item.guid = { '#text': itemLink, '@_isPermaLink': 'true' }; |
There was a problem hiding this comment.
Since it depends on link, I add it here. But I don't know if this property is supposed to be something else when there is no link
bluwy
left a comment
There was a problem hiding this comment.
Looks great! Thanks for fixing the other fields as well.
Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
| return chai.expect(pagesGlobToRssItems(globResult)).to.not.be.rejected; | ||
| }); | ||
|
|
||
| it('should fail on missing "description" key if "title" is present', () => { |
There was a problem hiding this comment.
Minor nit: I think should fail should be should not fail to correctly match the behavior of the test.
There was a problem hiding this comment.
Yes you're right! Feel free to submit a PR
|
@florian-lefebvre I was looking closer at this fix to learn from it and I think there is a typo in the description of the test. See comment review above. Minor nit. |
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
Changes
Testing
Updated tests
Docs
withastro/docs#6154