diff --git a/web/app/api/rss/route.ts b/web/app/rss.xml/route.ts similarity index 87% rename from web/app/api/rss/route.ts rename to web/app/rss.xml/route.ts index a43f99d..04905e2 100644 --- a/web/app/api/rss/route.ts +++ b/web/app/rss.xml/route.ts @@ -20,14 +20,12 @@ async function parseChangelog(): Promise { const fileContents = fs.readFileSync(changelogPath, "utf8") const entries: ChangelogEntry[] = [] - // Split content by versions (assuming format ## [version] - date) const sections = fileContents.split(/^## /gm).filter((section) => section.trim()) for (const section of sections) { const lines = section.split("\n") const headerLine = lines[0] - // Extract version and date from header const versionMatch = headerLine.match(/\[([^\]]+)\]/) const dateMatch = headerLine.match(/(\d{4}-\d{2}-\d{2})/) @@ -45,7 +43,7 @@ async function parseChangelog(): Promise { } } - return entries.slice(0, 10) // Latest 10 entries + return entries.slice(0, 10) } catch (error) { console.error("Error parsing changelog:", error) return [] @@ -62,17 +60,18 @@ export async function GET() { ProxMenux Changelog Latest updates and changes in ProxMenux ${siteUrl}/changelog - - en + + en-US ${new Date().toUTCString()} ProxMenux RSS Generator + 60 ${entries .map( (entry) => ` ProxMenux ${entry.version} - + 500 ? "..." : ""}]]> ${entry.url} ${entry.url} ${new Date(entry.date).toUTCString()} diff --git a/web/components/navbar.tsx b/web/components/navbar.tsx index 18c1753..a0f5766 100644 --- a/web/components/navbar.tsx +++ b/web/components/navbar.tsx @@ -46,7 +46,7 @@ export default function Navbar() { {/* RSS Feed Link */} setIsMenuOpen(false)} target="_blank" diff --git a/web/components/rss-link.tsx b/web/components/rss-link.tsx index 137cdcd..aea30d8 100644 --- a/web/components/rss-link.tsx +++ b/web/components/rss-link.tsx @@ -6,7 +6,7 @@ import { useState } from "react" export default function RSSLink() { const [copied, setCopied] = useState(false) - const rssUrl = `${typeof window !== "undefined" ? window.location.origin : ""}/api/rss` + const rssUrl = `${typeof window !== "undefined" ? window.location.origin : ""}/rss.xml` const copyToClipboard = async () => { try { @@ -20,36 +20,39 @@ export default function RSSLink() { return (
-
-
+
+

Stay Updated!

-

- Subscribe to our RSS feed to get notified of new changes. Copy the URL below or click the RSS button. -

+

Subscribe to our RSS feed to get notified of new changes.

+
-
- {rssUrl} + {/* RSS URL and buttons - Responsive layout */} +
+
+ + {rssUrl} +
-
- - - RSS - + + + Open RSS Feed + +
)