I was following the astro guide to create a blog, so i use the astrojs/rss package to generate my rss.xml and got this: https://peterdotdev-astro-blogs.netlify.app/rss.xml
The thing is that when RSS readers preview your content images aren't being displayed. (see attached image )
So my thoughts are that the rss.xml.js that generates the rss.xml file:
import rss, { pagesGlobToRssItems } from '@astrojs/rss';
export async function GET(context) {
return rss({
title: 'Astro Learner | Blog',
description: 'My journey learning Astro',
site: context.site,
items: await pagesGlobToRssItems(import.meta.glob('./**/*.md')),
customData: `<language>en-us</language>`,
});
}
Is missing a tag when generating the <items></items> in the rss.xml that makes feedly readers show the image in their previews.
So taking a post.md for example this one:
---
layout: ../../layouts/MarkdownPostLayout.astro
title: My Fourth Blog Post
author: Astro Learner
description: "This post will show up on its own!"
image:
url: "https://docs.astro.build/default-og-image.png"
alt: "The word astro against an illustration of planets and stars."
pubDate: 2022-08-08
tags: ["astro", "successes"]
---
This post should show up with my other blog posts, because `Astro.glob()` is returning a list of all my posts in order to create my list.
What should i do to fix this issue?