diff --git a/web/app/rss.xml/route.ts b/web/app/rss.xml/route.ts index 1186c7e..eb8f174 100644 --- a/web/app/rss.xml/route.ts +++ b/web/app/rss.xml/route.ts @@ -13,20 +13,20 @@ interface ChangelogEntry { function formatContentForRSS(content: string): string { return ( content + .replace(/https:\/\/macrimi\.github\.io\/ProxMenux/g, "https://proxmenux.com") + .replace(/`([^`]+)`/g, "$1") .replace(/!\[([^\]]*)\]$$([^)]+)$$/g, (match, alt, url) => { // Convert relative URLs to absolute let absoluteUrl = url if (url.startsWith("/")) { absoluteUrl = `https://proxmenux.com${url}` - } else if (url.startsWith("http://") || url.startsWith("https://")) { - // Already absolute, but replace old GitHub URLs with new domain - absoluteUrl = url.replace("https://macrimi.github.io/ProxMenux", "https://proxmenux.com") - } else { + } else if (!url.startsWith("http://") && !url.startsWith("https://")) { // Relative path, make it absolute absoluteUrl = `https://proxmenux.com/${url}` } - return `${alt}` + return `${alt}` }) + // Convert markdown links to HTML .replace(/\[([^\]]+)\]$$([^)]+)$$/g, '$1') // Convert ### headers to

tags .replace(/^### (.+)$/gm, "

$1

") @@ -37,8 +37,7 @@ function formatContentForRSS(content: string): string { const code = match.replace(/```/g, "").trim() return `
${code}
` }) - .replace(/`([^`]+)`/g, "$1") - // Convert - bullet points to