Skip to content

Commit

Permalink
Fixes the xml and json feeds.
Browse files Browse the repository at this point in the history
  • Loading branch information
bmartinez287 committed Mar 31, 2024
1 parent c07f630 commit 8fe90ff
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
9 changes: 5 additions & 4 deletions src/pages/blog/feed.json.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,9 @@ const feed = {
items: feedItems,
}

export async function get({ params, request }) {
return {
body: JSON.stringify(feed),
}
export async function GET(context) {
return Response.json({
success: true,
result: feed
})
}
5 changes: 3 additions & 2 deletions src/pages/blog/rss.xml.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ const items = recentPosts.map((post) => {

const buildDate = new Date().toUTCString()

export const get = () =>
rss({
export async function GET(context) {
return rss({
title: `DDEV Blog`,
description: BLOG_DESCRIPTION,
site: blogUrl,
Expand All @@ -70,3 +70,4 @@ export const get = () =>
<webfeeds:logo>${baseUrl}/favicon/type-only.svg</webfeeds:logo>
`,
})
}

0 comments on commit 8fe90ff

Please sign in to comment.