Skip to content

Commit b34aae4

Browse files
committed
added rss
1 parent a0548f4 commit b34aae4

File tree

5 files changed

+60
-4
lines changed

5 files changed

+60
-4
lines changed

app/rss.xml/route.ts

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
import { generateRegistryRssFeed } from "@wandry/analytics-sdk";
2+
import type { NextRequest } from "next/server";
3+
4+
export const revalidate = 3600;
5+
6+
export async function GET(request: NextRequest) {
7+
const baseUrl = new URL(request.url).origin;
8+
9+
const rssXml = await generateRegistryRssFeed({
10+
baseUrl,
11+
rss: {
12+
title: "@retroui",
13+
description: "Subscribe to @retroui updates",
14+
link: "https://retroui.dev",
15+
pubDateStrategy: "githubLastEdit",
16+
},
17+
github: {
18+
owner: "your-username",
19+
repo: "your-repo",
20+
token: process.env.GITHUB_TOKEN,
21+
},
22+
});
23+
24+
if (!rssXml) {
25+
return new Response("RSS feed not available", {
26+
status: 404,
27+
headers: { "Content-Type": "text/plain" },
28+
});
29+
}
30+
31+
return new Response(rssXml, {
32+
headers: {
33+
"Content-Type": "application/rss+xml; charset=utf-8",
34+
"Cache-Control":
35+
"public, max-age=3600, s-maxage=3600, stale-while-revalidate=86400",
36+
},
37+
});
38+
}

components/footer.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ export default function Footer() {
33
<footer className="bg-black py-8">
44
<div className="container max-w-6xl mx-auto flex flex-col lg:flex-row space-y-4 lg:space-y-0 justify-between items-center">
55
<div className="flex justify-center space-x-4">
6+
<a href="https://commercn.com" className="text-primary">
7+
CommerCN
8+
</a>
69
<a href="https://twitter.com/ariflogs" className="text-primary">
710
Twitter
811
</a>

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
"@radix-ui/react-visually-hidden": "^1.1.0",
3232
"@vercel/analytics": "^1.5.0",
3333
"@vercel/speed-insights": "^1.2.0",
34+
"@wandry/analytics-sdk": "^1.16.0",
3435
"class-variance-authority": "^0.7.0",
3536
"clsx": "^2.1.1",
3637
"cmdk": "^1.1.1",

pnpm-lock.yaml

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

showcase.json

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
2-
"pouf.chat": {
3-
"name": "Pouf Chat",
4-
"url": "https://pouf.chat",
5-
"cover": "https://pub-5f7cbdfd9ffa4c838e386788f395f0c4.r2.dev/showcase/pouf.chat.png",
2+
"codeinpublic.com": {
3+
"name": "Code in Public",
4+
"url": "https://codeinpublic.com",
5+
"cover": "https://pub-5f7cbdfd9ffa4c838e386788f395f0c4.r2.dev/showcase/codeinpublic.jpg",
66
"color": "purple-200"
77
},
88
"buildersguild.space": {
@@ -11,6 +11,12 @@
1111
"cover": "https://pub-5f7cbdfd9ffa4c838e386788f395f0c4.r2.dev/showcase/buildersguild.space.png",
1212
"color": "orange-200"
1313
},
14+
"pouf.chat": {
15+
"name": "Pouf Chat",
16+
"url": "https://pouf.chat",
17+
"cover": "https://pub-5f7cbdfd9ffa4c838e386788f395f0c4.r2.dev/showcase/pouf.chat.png",
18+
"color": "purple-200"
19+
},
1420
"startcod.ing": {
1521
"name": "Start Coding",
1622
"url": "https://startcoding.ing",

0 commit comments

Comments
 (0)