diff --git a/public/__redirects b/public/__redirects index 2f72555e57bbe70..6b76338ac755581 100644 --- a/public/__redirects +++ b/public/__redirects @@ -37,7 +37,7 @@ /ssl/changelog/index.xml /changelog/rss/ssl.xml 301 ## legacy -/changelog/index.xml /release-notes/index.xml 301 +/release-notes/index.xml /changelog/rss/index.xml 301 /release-notes/ /changelog/ 301 # 1dot1_redirect @@ -1300,7 +1300,7 @@ /support/account-management-billing/cloudflare-billing-policy/ /billing/billing-policy/ 301 /support/account-management-billing/billing-add-on-service/ /billing/usage-based-billing/ 301 /support/account-management-billing/understanding-cloudflare-sales-tax/ /billing/sales-tax/ 301 -/support/account-management-billing/ /support/troubleshooting/general-troubleshooting/cannot-locate-dashboard-account/ 301 +/support/account-management-billing/ /support/troubleshooting/general-troubleshooting/cannot-locate-dashboard-account/ 301 /support/account-management-billing/cannot-locate-dashboard-account/ /support/troubleshooting/general-troubleshooting/cannot-locate-dashboard-account/ 301 # r2 diff --git a/src/content/release-notes/feed-deprecation-ddos.yaml b/src/content/release-notes/feed-deprecation-ddos.yaml deleted file mode 100644 index e39df7175f91fa6..000000000000000 --- a/src/content/release-notes/feed-deprecation-ddos.yaml +++ /dev/null @@ -1,13 +0,0 @@ ---- -link: "/ddos-protection/change-log/" -productName: DDoS protection -productLink: "/ddos-protection/" -productArea: Application security -productAreaLink: /fundamentals/reference/changelog/security/ -entries: - - publish_date: "2025-05-14" - title: "Final notice - Move to Changelog RSS feed" - description: |- - Release notes are being deprecated in favor of the [Cloudflare changelog](/changelog/) at the end of May 2025. - - To keep up with product updates to DDoS protection, subscribe to [the product-specific RSS feeds](/ddos-protection/change-log/#rss-feeds) instead. diff --git a/src/content/release-notes/feed-deprecation-waf.yaml b/src/content/release-notes/feed-deprecation-waf.yaml deleted file mode 100644 index 29091f0410b63bb..000000000000000 --- a/src/content/release-notes/feed-deprecation-waf.yaml +++ /dev/null @@ -1,13 +0,0 @@ ---- -link: "/waf/change-log/" -productName: WAF -productLink: "/waf/" -productArea: Application security -productAreaLink: /fundamentals/reference/changelog/security/ -entries: - - publish_date: "2025-05-14" - title: "Final notice - Move to Changelog RSS feed" - description: |- - Release notes are being deprecated in favor of the [Cloudflare changelog](/changelog/) at the end of May 2025. - - To keep up with product updates to the WAF, subscribe to [the product-specific RSS feed](/waf/change-log/index.xml) instead. diff --git a/src/content/release-notes/feed-deprecation.yaml b/src/content/release-notes/feed-deprecation.yaml deleted file mode 100644 index b3df2815d09226e..000000000000000 --- a/src/content/release-notes/feed-deprecation.yaml +++ /dev/null @@ -1,20 +0,0 @@ ---- -link: "/fundamentals/new-features/available-rss-feeds/" -productName: Fundamentals -productLink: "/fundamentals/" -productArea: Core platform -productAreaLink: /fundamentals/reference/changelog/platform/ -entries: - - publish_date: "2025-05-14" - title: "Final notice - Move to Changelog RSS feed" - description: |- - Release notes are being deprecated in favor of the [Cloudflare changelog](/changelog/) at the end of May 2025. - - To keep up with product updates, subscribe to [the Changelog RSS feed](/changelog/rss/index.xml) instead. Or, review your options at [Available RSS feeds](/fundamentals/new-features/available-rss-feeds/). - - - publish_date: "2025-04-25" - title: "Move to Changelog RSS feed" - description: |- - Release notes are being deprecated in favor of the [Cloudflare changelog](/changelog/). - - To keep up with product updates, subscribe to [the Changelog RSS feed](/changelog/rss/index.xml) instead. Or, review your options at [Available RSS feeds](/fundamentals/new-features/available-rss-feeds/). diff --git a/src/pages/release-notes/index.xml.ts b/src/pages/release-notes/index.xml.ts deleted file mode 100644 index 106468d71a1a707..000000000000000 --- a/src/pages/release-notes/index.xml.ts +++ /dev/null @@ -1,95 +0,0 @@ -import rss from "@astrojs/rss"; -import { getCollection, getEntry } from "astro:content"; -import type { APIRoute } from "astro"; -import { marked, type Token } from "marked"; -import { slug } from "github-slugger"; -import { entryToString } from "~/util/container"; - -export const GET: APIRoute = async (context) => { - function walkTokens(token: Token) { - if (token.type === "image" || token.type === "link") { - if (token.href.startsWith("/")) { - token.href = context.site + token.href.slice(1); - } - } - } - - marked.use({ walkTokens }); - - const releaseNotes = await getCollection("release-notes", (e) => { - return e.id !== "api-deprecations"; - }); - - const mapped = await Promise.all( - releaseNotes.flatMap((product) => { - return product.data.entries.map(async (entry) => { - let description; - if (entry.individual_page) { - const link = entry.link; - - if (!link) - throw new Error( - `Changelog entry points to individual page but no link is provided`, - ); - - const page = await getEntry("docs", link.slice(1, -1)); - - if (!page) - throw new Error( - `Changelog entry points to ${link.slice(1, -1)} but unable to find entry with that slug`, - ); - - description = - (await entryToString(page, context.locals)) ?? page.body; - } else { - description = entry.description; - } - - let link; - if (entry.link) { - link = entry.link; - } else { - const anchor = slug(entry.title ?? entry.publish_date); - link = product.data.link.concat(`#${anchor}`); - } - - let title; - if (entry.scheduled) { - title = `Scheduled for ${entry.scheduled_date}`; - } else { - title = entry.title; - } - - return { - product: product.data.productName, - link, - date: entry.publish_date, - description, - title, - }; - }); - }), - ); - - const entries = mapped.sort((a, b) => { - return a.date < b.date ? 1 : a.date > b.date ? -1 : 0; - }); - - return rss({ - title: `Cloudflare release notes`, - description: `Updates to various Cloudflare products.`, - site: "https://developers.cloudflare.com/release-notes/", - trailingSlash: false, - items: entries.map((entry) => { - return { - title: `${entry.product} - ${entry.title ?? entry.date}`, - description: marked.parse(entry.description ?? "", { - async: false, - }) as string, - pubDate: new Date(entry.date), - link: entry.link, - customData: `${entry.product}`, - }; - }), - }); -}; diff --git a/worker/index.worker.test.ts b/worker/index.worker.test.ts index 931d1d0e6f4b684..a73a1f860305ad8 100644 --- a/worker/index.worker.test.ts +++ b/worker/index.worker.test.ts @@ -43,13 +43,6 @@ describe("Cloudflare Docs", () => { expect(response.headers.get("Location")).toBe("/products/"); }); - it("redirects /changelog/index.xml to /release-notes/index.xml", async () => { - const request = new Request("http://fakehost/changelog/index.xml"); - const response = await SELF.fetch(request, { redirect: "manual" }); - expect(response.status).toBe(301); - expect(response.headers.get("Location")).toBe("/release-notes/index.xml"); - }); - it("redirects /changelog-next/ to /changelog/", async () => { const request = new Request("http://fakehost/changelog-next/"); const response = await SELF.fetch(request, { redirect: "manual" }); @@ -166,27 +159,6 @@ describe("Cloudflare Docs", () => { expect(item.pubDate).toBe("Mon, 03 Mar 2025 06:00:00 GMT"); }); - it("legacy global", async () => { - const request = new Request("http://fakehost/release-notes/index.xml"); - const response = await SELF.fetch(request); - - expect(response.status).toBe(200); - - const xml = await response.text(); - const parsed = parser.parse(xml); - const { channel } = parsed.rss; - - expect(channel.title).toBe("Cloudflare release notes"); - - const item = channel.item.find( - (item: any) => item.title === "WAF - 2025-02-24", - ); - - expect(item).toBeDefined(); - expect(item.product).toBe("WAF"); - expect(item.pubDate).toBe("Mon, 24 Feb 2025 00:00:00 GMT"); - }); - it("legacy product-specific", async () => { const request = new Request("http://fakehost/waf/change-log/index.xml"); const response = await SELF.fetch(request);