From 1d95ff58d9c5d83628fa00d1d036805d31b6dd1c Mon Sep 17 00:00:00 2001
From: Anima <18208134+animafps@users.noreply.github.com>
Date: Mon, 24 Jan 2022 16:19:36 +0000
Subject: [PATCH] Set channel link in rss.xml to site index (#2450)
* Set channel link in rss.xml to site index
This is the RSS 2.0 spec and fixes issue with pretty-feed-v3 "View Website" link pointing back to the feed
* tests: edited rss gen test
---
packages/astro/src/core/ssr/rss.ts | 8 ++++----
packages/astro/test/astro-sitemap-rss.test.js | 4 ++--
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/packages/astro/src/core/ssr/rss.ts b/packages/astro/src/core/ssr/rss.ts
index 269ffbdf4..cba4b4e5d 100644
--- a/packages/astro/src/core/ssr/rss.ts
+++ b/packages/astro/src/core/ssr/rss.ts
@@ -12,12 +12,12 @@ export function validateRSS(args: GenerateRSSArgs): void {
if (!Array.isArray(rssData.items)) throw new Error(`[${srcFile}] rss.items should be an array of items`);
}
-type GenerateRSSArgs = { site: string; rssData: RSS; srcFile: string; feedURL: string };
+type GenerateRSSArgs = { site: string; rssData: RSS; srcFile: string };
/** Generate RSS 2.0 feed */
export function generateRSS(args: GenerateRSSArgs): string {
validateRSS(args);
- const { srcFile, feedURL, rssData, site } = args;
+ const { srcFile, rssData, site } = args;
if ((rssData as any).item) throw new Error(`[${srcFile}] rss() \`item()\` function was deprecated, and is now \`items: object[]\`.`);
let xml = ``;
@@ -38,7 +38,7 @@ export function generateRSS(args: GenerateRSSArgs): string {
// title, description, customData
xml += `