Skip to content

Commit

Permalink
Fix: rss.xml not found
Browse files Browse the repository at this point in the history
  • Loading branch information
duy-lv committed Jun 20, 2024
1 parent 865adae commit 7c2c9b0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/pages/rss.xml.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ import rss from '@astrojs/rss'
import { getCollection } from 'astro:content'
import { siteConfig } from '@/site-config'

export async function get() {
export async function GET(context: any) {
const posts = await getCollection('blog')
return rss({
title: siteConfig.title,
description: siteConfig.description,
site: import.meta.env.SITE,
site: context.site,
items: posts.map((post) => ({
...post.data,
link: `post/${post.slug}/`
Expand Down

0 comments on commit 7c2c9b0

Please sign in to comment.