Source identity
| Field | Recorded value |
|---|---|
| Source type | GitHub source |
| Original record | Janady13/llms-txt-hub / apps/web/app/(files)/rss.xml/route.ts |
| Date | Not specified in source |
| Repository | Janady13/llms-txt-hub |
| Revision | e0f4bf978d4df168369c7601d9c5f5ea89e84377 |
| Branch | main |
| Path or archive member | apps/web/app/(files)/rss.xml/route.ts |
| Original SHA-256 | 5d5de4ca310166dd0c26b434898537c012b27ccbda08425b07fa2ed11464fd27 |
| Git blob SHA | dc747b6b6f1a20eb782894cc56cd8a13b19f2e2c |
| Reading-copy SHA-256 | 5d5de4ca310166dd0c26b434898537c012b27ccbda08425b07fa2ed11464fd27 |
Recovered source transcript
Download complete source text ↓50 lines · 1.3 KB
import { getWebsites, type WebsiteMetadata } from '@/lib/content-loader'
const baseUrl = process.env.NEXT_PUBLIC_APP_URL || 'https://llmstxthub.com'
/**
* Handles GET requests to generate the RSS feed as JSON
*/
export async function GET() {
const websitesData = await getWebsites()
const feed = {
version: 'https://jsonfeed.org/version/1',
title: 'llms.txt Hub',
home_page_url: baseUrl,
feed_url: `${baseUrl}/rss.xml`,
description: 'Latest updates from llms.txt Hub',
icon: `${baseUrl}/apple-touch-icon.png`,
favicon: `${baseUrl}/favicon.ico`,
authors: [
{
name: 'llms.txt Hub',
url: 'https://llmstxthub.com'
}
],
language: 'en',
items: [
...websitesData.map((site: WebsiteMetadata) => ({
id: site.slug,
url: `${baseUrl}/websites/${site.slug}`,
title: site.name,
content_html: site.description,
date_published: site.publishedAt,
authors: [
{
name: 'llms.txt Hub',
url: 'https://llmstxthub.com'
}
],
categories: ['Website', site.category || 'Uncategorized']
}))
]
}
return new Response(JSON.stringify(feed), {
headers: {
'content-type': 'application/json;charset=UTF-8'
}
})
}