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

Clarify how to add images to RSS #7099

Closed
tommyp opened this issue Feb 28, 2024 · 6 comments · Fixed by #7570
Closed

Clarify how to add images to RSS #7099

tommyp opened this issue Feb 28, 2024 · 6 comments · Fixed by #7570
Labels
help wanted Issues looking for someone to run with them! improve documentation Enhance existing documentation (e.g. add an example, improve description)

Comments

@tommyp
Copy link
Contributor

tommyp commented Feb 28, 2024

📚 Subject area/topic

RSS

📋 Page(s) affected (or suggested, for new content)

https://docs.astro.build/en/guides/rss/

📋 Description of content that is out-of-date or incorrect

Following the guide for adding an RSS feed, you'll be left with an RSS feed with no images.

Explaining how to add this with sanitize-html would be good.

I've forked and added this here, until I read that I should open an issue for something more than a typo.

Happy to open a PR with my fork too.

🖥️ Reproduction in StackBlitz (if reporting incorrect content or code samples)

No response

@tommyp tommyp added the improve documentation Enhance existing documentation (e.g. add an example, improve description) label Feb 28, 2024
@at-the-vr
Copy link
Member

That's a great suggestion tommy 😄

@tommyp
Copy link
Contributor Author

tommyp commented Feb 29, 2024

@at-the-vr Is it ok to open a PR for my fork?

@at-the-vr
Copy link
Member

I gotta ask if you could wait for approval from maintainers 🙏

@sarah11918
Copy link
Member

Hi @tommyp , this looks like a great idea to add to the RSS content! Thank you for suggesting it!

Thank you for also waiting for the discussion here, and I do have thoughts...

Since we try to keep things concise and simple for everyone, what would you think about working this into the main example itself? So, no second code sample, but add everything required to the original code sample?

So, assume someone did want to include images. What all is required to add to that snippet, and what does the whole thing look like?

The line could be adjusted to something like:

When using content collections, render the post body using a standard Markdown parser like markdown-it and sanitize the result, including any extra tags (e.g. <img>) needed to render your content:

Would be happy to receive a PR along those lines, and we can work out the fine details in the PR itself! 🙌

@sarah11918 sarah11918 added the help wanted Issues looking for someone to run with them! label Mar 4, 2024
@SatanshuMishra
Copy link
Contributor

I am happy to take a look at implementing this. Since @tommyp already has a fork that does some of the work, if he gets a PR in will let him take it :)!

@tommyp
Copy link
Contributor Author

tommyp commented Mar 25, 2024

@sarah11918 Thanks for the suggestion and the vote of confidence @SatanshuMishra! I've opened the PR. Glad I could make a contribution to such an awesome project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Issues looking for someone to run with them! improve documentation Enhance existing documentation (e.g. add an example, improve description)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants