diff --git a/packages/astro-ghostcms/package.json b/packages/astro-ghostcms/package.json index c93224e3..49953935 100644 --- a/packages/astro-ghostcms/package.json +++ b/packages/astro-ghostcms/package.json @@ -1,7 +1,7 @@ { "name": "@matthiesenxyz/astro-ghostcms", "description": "Astro GhostCMS integration to allow easier importing of GhostCMS Content", - "version": "3.0.5", + "version": "3.0.6", "homepage": "https://astro-ghostcms.xyz/", "type": "module", "license": "MIT", diff --git a/packages/astro-ghostcms/src/default-routes/rss.xml.js b/packages/astro-ghostcms/src/default-routes/rss.xml.js index dbef4669..1e9f59a6 100644 --- a/packages/astro-ghostcms/src/default-routes/rss.xml.js +++ b/packages/astro-ghostcms/src/default-routes/rss.xml.js @@ -1,18 +1,19 @@ import rss from "@astrojs/rss"; -import { getPosts, getSettings } from '../api'; +import { getAllPosts, getSettings } from '../api'; import invariant from "tiny-invariant"; export async function GET(context) { - const posts = await getPosts(); + const posts = await getAllPosts(); const settings = await getSettings(); invariant(settings, "Settings not found"); + const allPosts = [...posts]; const title = settings.title; const description = settings.description; return rss({ title: title, description: description, site: context.site, - items: posts.map((post) => ({ + items: allPosts.map((post) => ({ title: post.title, pubDate: post.published_at, description: post.excerpt,