update rss for new api
This commit is contained in:
parent
6feeebbf36
commit
d01b5294a2
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "@matthiesenxyz/astro-ghostcms",
|
"name": "@matthiesenxyz/astro-ghostcms",
|
||||||
"description": "Astro GhostCMS integration to allow easier importing of GhostCMS Content",
|
"description": "Astro GhostCMS integration to allow easier importing of GhostCMS Content",
|
||||||
"version": "3.0.3",
|
"version": "3.0.4",
|
||||||
"homepage": "https://astro-ghostcms.xyz/",
|
"homepage": "https://astro-ghostcms.xyz/",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
import rss from "@astrojs/rss";
|
import rss from "@astrojs/rss";
|
||||||
import { getGhostPosts, getGhostSettings } from '../api_old';
|
import { getPosts, getSettings } from '../api';
|
||||||
import invariant from "tiny-invariant";
|
import invariant from "tiny-invariant";
|
||||||
|
|
||||||
export async function GET(context) {
|
export async function GET(context) {
|
||||||
const posts = await getGhostPosts();
|
const posts = await getPosts();
|
||||||
const settings = await getGhostSettings();
|
const settings = await getSettings();
|
||||||
invariant(settings, "Settings not found");
|
invariant(settings, "Settings not found");
|
||||||
const title = settings.title;
|
const title = settings.title;
|
||||||
const description = settings.description;
|
const description = settings.description;
|
||||||
|
@ -16,7 +16,7 @@ export async function GET(context) {
|
||||||
title: post.title,
|
title: post.title,
|
||||||
pubDate: post.published_at,
|
pubDate: post.published_at,
|
||||||
description: post.excerpt,
|
description: post.excerpt,
|
||||||
link: `/blog/${post.slug}/`,
|
link: `/${post.slug}/`,
|
||||||
})),
|
})),
|
||||||
});
|
});
|
||||||
}
|
}
|
Loading…
Reference in New Issue