From 9db5dc611ff10ae3bb410f6b75a58a138bbee571 Mon Sep 17 00:00:00 2001 From: Kian Newman-Hazel Date: Thu, 20 Mar 2025 20:01:42 +0000 Subject: [PATCH 01/15] [Docs Site] Add AvailableChangelogFeeds component --- src/components/AvailableChangelogFeeds.astro | 41 ++++++++++++++++++ src/components/RSSButton.astro | 22 ++++++++++ .../changelog/available-rss-feeds.mdx | 43 +++++++++++++++++++ .../{changelog.mdx => changelog/index.mdx} | 1 + src/util/products.ts | 10 +++++ 5 files changed, 117 insertions(+) create mode 100644 src/components/AvailableChangelogFeeds.astro create mode 100644 src/components/RSSButton.astro create mode 100644 src/content/docs/fundamentals/changelog/available-rss-feeds.mdx rename src/content/docs/fundamentals/{changelog.mdx => changelog/index.mdx} (95%) create mode 100644 src/util/products.ts diff --git a/src/components/AvailableChangelogFeeds.astro b/src/components/AvailableChangelogFeeds.astro new file mode 100644 index 000000000000000..194716e39b48c35 --- /dev/null +++ b/src/components/AvailableChangelogFeeds.astro @@ -0,0 +1,41 @@ +--- +import AnchorHeading from "./AnchorHeading.astro"; +import RSSButton from "./RSSButton.astro"; + +import { products, productsByGroup } from "~/util/products"; +import Details from "./Details.astro"; +--- + + + + +

+ This feed contains entries for all Cloudflare products: + + + { + productsByGroup.map(([group, products]) => ( + <> + +

+ This feed contains entries for all {group} products:{" "} + +

+
+ +
+ + )) + } +

diff --git a/src/components/RSSButton.astro b/src/components/RSSButton.astro new file mode 100644 index 000000000000000..52c6f913b101af9 --- /dev/null +++ b/src/components/RSSButton.astro @@ -0,0 +1,22 @@ +--- +import { z } from "astro:schema"; +import { Icon } from "@astrojs/starlight/components"; + +const props = z.object({ + changelog: z + .string() + .transform((val) => val.toLowerCase().replaceAll(" ", "-")) + .default("index"), +}); + +const { changelog } = props.parse(Astro.props); +--- + + + Subscribe to RSS + + diff --git a/src/content/docs/fundamentals/changelog/available-rss-feeds.mdx b/src/content/docs/fundamentals/changelog/available-rss-feeds.mdx new file mode 100644 index 000000000000000..86bf9c4b750dead --- /dev/null +++ b/src/content/docs/fundamentals/changelog/available-rss-feeds.mdx @@ -0,0 +1,43 @@ +--- +title: Available RSS Feeds +description: Read about the various RSS feeds available for Cloudflare's changelogs. +--- + +import AvailableChangelogFeeds from '~/components/AvailableChangelogFeeds.astro'; + +## Consuming RSS Feeds + +Our changelogs are published to various RSS feeds with HTML in the `` tag. + +In feeds with multiple products, such as the global or product-area feeds, the products associated with a given entry are in the `` tag. + +A single product will also appear in the custom `` tag for legacy reasons, but we recommend you use the `` + +### Example XML + +```xml + + + Cloudflare changelogs + Updates to various Cloudflare products + https://developers.cloudflare.com/changelog/ + + Agents, Workers, Workflows - Build AI Agents with Example Prompts + https://developers.cloudflare.com/changelog/2025-02-14-example-ai-prompts/ + https://developers.cloudflare.com/changelog/2025-02-14-example-ai-prompts/ + +

+ We've added an example prompt to help you get started with building AI agents and applications on Cloudflare ... +

+
+ Fri, 14 Feb 2025 19:00:00 GMT + Agents + Agents + Workers + Workflows +
+
+
+``` + + \ No newline at end of file diff --git a/src/content/docs/fundamentals/changelog.mdx b/src/content/docs/fundamentals/changelog/index.mdx similarity index 95% rename from src/content/docs/fundamentals/changelog.mdx rename to src/content/docs/fundamentals/changelog/index.mdx index e8c819f79a389a4..972e31e82efcd84 100644 --- a/src/content/docs/fundamentals/changelog.mdx +++ b/src/content/docs/fundamentals/changelog/index.mdx @@ -4,6 +4,7 @@ title: Changelog release_notes_file_name: - fundamentals sidebar: + label: Fundamentals order: 9 --- diff --git a/src/util/products.ts b/src/util/products.ts new file mode 100644 index 000000000000000..5ec2fe94899a27d --- /dev/null +++ b/src/util/products.ts @@ -0,0 +1,10 @@ +import { getCollection } from "astro:content"; + +export const products = await getCollection("products"); + +export const productsByGroup = Object.entries( + Object.groupBy( + products.filter((product) => Boolean(product.data.product.group)), + (product) => product.data.product.group, + ), +).sort(); From 6968db4f1bd30c626469b95936e67345da29f4d7 Mon Sep 17 00:00:00 2001 From: Kian Newman-Hazel Date: Thu, 20 Mar 2025 20:18:10 +0000 Subject: [PATCH 02/15] astro check errors --- src/components/AvailableChangelogFeeds.astro | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/AvailableChangelogFeeds.astro b/src/components/AvailableChangelogFeeds.astro index 194716e39b48c35..a8d758404db5a48 100644 --- a/src/components/AvailableChangelogFeeds.astro +++ b/src/components/AvailableChangelogFeeds.astro @@ -2,7 +2,7 @@ import AnchorHeading from "./AnchorHeading.astro"; import RSSButton from "./RSSButton.astro"; -import { products, productsByGroup } from "~/util/products"; +import { productsByGroup } from "~/util/products"; import Details from "./Details.astro"; --- @@ -23,7 +23,7 @@ import Details from "./Details.astro";