-
Notifications
You must be signed in to change notification settings - Fork 10.2k
[Docs Site] Add AvailableChangelogFeeds component #21001
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
9db5dc6
[Docs Site] Add AvailableChangelogFeeds component
KianNH 6968db4
astro check errors
KianNH 2993994
fix p tag
KianNH b851446
aside for ddos and waf
KianNH e44e037
work from products that have entries
KianNH 17f574d
move aside
KianNH d263c71
Merge branch 'production' into kian/PCX-16500
kodster28 fa20b16
Small tweaks to naming and organization
kodster28 effb5b7
rephrase
kodster28 a6427da
Remove link
kodster28 a8b3212
Add API deprecations callout
kodster28 39667eb
whoops, remove logging
kodster28 155430b
Merge branch 'production' into kian/PCX-16500
kodster28 9b968ee
update name
kodster28 88841ec
fix schema
KianNH e233a25
move changelog back to file
KianNH 8932fe3
Add connecting sentence
kodster28 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,113 @@ | ||
| --- | ||
| import { Aside } from "@astrojs/starlight/components"; | ||
|
|
||
| import AnchorHeading from "./AnchorHeading.astro"; | ||
| import RSSButton from "./RSSButton.astro"; | ||
| import Details from "./Details.astro"; | ||
|
|
||
| import { getCollection } from "astro:content"; | ||
| import { getChangelogs } from "~/util/changelog"; | ||
|
|
||
| const changelogs = await getChangelogs({}); | ||
| const productsInChangelog = changelogs.flatMap((entry) => | ||
| entry.data.products.map((product) => product.id), | ||
| ); | ||
|
|
||
| const products = await getCollection("products", (entry) => { | ||
| return productsInChangelog.includes(entry.id); | ||
| }); | ||
|
|
||
| const productsByGroup = Object.entries( | ||
| Object.groupBy( | ||
| products.filter((product) => Boolean(product.data.product.group)), | ||
| (product) => product.data.product.group, | ||
| ), | ||
| ).sort(); | ||
| --- | ||
|
|
||
| <AnchorHeading depth={2} title="Feeds" /> | ||
|
|
||
| <AnchorHeading depth={3} title="Global feed" /> | ||
| <p> | ||
| This feed contains entries for all Cloudflare products in the changelog: <RSSButton | ||
| changelog="index" | ||
| /> | ||
| </p> | ||
|
|
||
| <AnchorHeading depth={3} title="Area-specific feeds" /> | ||
|
|
||
| <p> | ||
| Cloudflare also offers RSS feeds scoped to specific product areas or products | ||
| in the <a href="/changelog/">changelog</a>. | ||
| </p> | ||
|
|
||
| { | ||
| productsByGroup.map(([group, products]) => ( | ||
| <> | ||
| <AnchorHeading depth={4} title={group} /> | ||
| <p> | ||
| This feed is for all {group} products in the changelog:{" "} | ||
| <RSSButton changelog={group} /> | ||
| </p> | ||
| <Details header="Included products"> | ||
| <ul> | ||
| {products?.map((product) => ( | ||
| <li> | ||
| <p> | ||
| <a href={product.data.product.url}> | ||
| {product.data.product.title} | ||
| </a> | ||
| </p> | ||
| <RSSButton changelog={product.id} /> | ||
| </li> | ||
| ))} | ||
| </ul> | ||
| </Details> | ||
| {group === "Application security" && ( | ||
| <Aside type="note" title="DDoS and WAF ruleset feeds"> | ||
| <p> | ||
| For <a href="/ddos-protection/">DDoS Protection</a> or{" "} | ||
| <a href="/waf/">WAF</a> updates to managed rulesets, please refer to | ||
| their independent feeds: | ||
| <ul> | ||
| <li> | ||
| <p> | ||
| <a href="/ddos-protection/change-log/network/"> | ||
| Network-layer DDoS managed ruleset | ||
| </a> | ||
| </p> | ||
| <RSSButton href="/ddos-protection/change-log/network/index.xml" /> | ||
| </li> | ||
| <li> | ||
| <p> | ||
| <a href="/ddos-protection/change-log/http/"> | ||
| HTTP DDoS managed ruleset | ||
| </a> | ||
| </p> | ||
| <RSSButton href="/ddos-protection/change-log/http/index.xml" /> | ||
| </li> | ||
| <li> | ||
| <p> | ||
| <a href="/waf/change-log/">WAF managed ruleset</a> | ||
| </p> | ||
| <RSSButton href="/waf/change-log/index.xml" /> | ||
| </li> | ||
| </ul> | ||
| </p> | ||
| </Aside> | ||
| )} | ||
| {group === "Core platform" && ( | ||
| <Aside type="note" title="API deprecations feed"> | ||
| <p> | ||
| Cloudflare also maintains a separate{" "} | ||
| <a href="/fundamentals/api/reference/deprecations/"> | ||
| API deprecations page. | ||
| </a> | ||
| <br /> | ||
| <RSSButton href="/fundamentals/api/reference/deprecations/index.xml" /> | ||
| </p> | ||
| </Aside> | ||
| )} | ||
| </> | ||
| )) | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| --- | ||
| import { z } from "astro:schema"; | ||
| import { Icon } from "@astrojs/starlight/components"; | ||
|
|
||
| const props = z | ||
| .object({ | ||
| changelog: z | ||
| .string() | ||
| .transform((val) => val.toLowerCase().replaceAll(" ", "-")), | ||
| }) | ||
| .or( | ||
| z.object({ | ||
| href: z.string(), | ||
| }), | ||
| ); | ||
|
|
||
| const input = props.parse(Astro.props); | ||
| --- | ||
|
|
||
| <a | ||
| href={"href" in input ? input.href : `/changelog/rss/${input.changelog}.xml`} | ||
| class="inline-flex items-center justify-center gap-1 rounded font-semibold no-underline" | ||
| target="_blank" | ||
| > | ||
| Subscribe to RSS | ||
| <Icon name="rss" size="1.25rem" /> | ||
| </a> |
13 changes: 13 additions & 0 deletions
13
src/content/docs/fundamentals/new-features/available-rss-feeds.mdx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| --- | ||
| title: Available RSS Feeds | ||
| pcx_content_type: reference | ||
| description: Read about the various RSS feeds available for Cloudflare's changelogs. | ||
| --- | ||
|
|
||
| import AvailableChangelogFeeds from "~/components/AvailableChangelogFeeds.astro"; | ||
|
|
||
| Cloudflare offers various RSS feeds as part of our [changelog](/changelog/), which helps you stay up to date on new features and functionality. | ||
|
|
||
| For more details on how these feeds are structured, refer to [Consuming RSS Feeds](/fundamentals/new-features/consuming-rss-feeds/). | ||
|
|
||
| <AvailableChangelogFeeds /> |
38 changes: 38 additions & 0 deletions
38
src/content/docs/fundamentals/new-features/consuming-rss-feeds.mdx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| --- | ||
| title: Consuming RSS Feeds | ||
| pcx_content_type: reference | ||
| description: Learn how to consume our changelog RSS feeds. | ||
| --- | ||
|
|
||
| Our [changelogs](/changelog/) are published to [various RSS feeds](/fundamentals/new-features/available-rss-feeds/) with HTML in the `<description>` tag. | ||
|
|
||
| In feeds with multiple products, such as the global or product-area feeds, the products associated with a given entry are in the `<category>` tag. | ||
|
|
||
| A single product will also appear in the custom `<product>` tag for legacy reasons, but we recommend you use the `<category>` | ||
|
|
||
| ## Example XML | ||
|
|
||
| ```xml | ||
| <rss version="2.0"> | ||
| <channel> | ||
| <title>Cloudflare changelogs</title> | ||
| <description>Updates to various Cloudflare products</description> | ||
| <link>https://developers.cloudflare.com/changelog/</link> | ||
| <item> | ||
| <title>Agents, Workers, Workflows - Build AI Agents with Example Prompts</title> | ||
| <link>https://developers.cloudflare.com/changelog/2025-02-14-example-ai-prompts/</link> | ||
| <guid isPermaLink="true">https://developers.cloudflare.com/changelog/2025-02-14-example-ai-prompts/</guid> | ||
| <description> | ||
| <p> | ||
| We've added an <a href="https://developers.cloudflare.com/workers/get-started/prompting/">example prompt</a> to help you get started with building AI agents and applications on Cloudflare ... | ||
| </p> | ||
| </description> | ||
| <pubDate>Fri, 14 Feb 2025 19:00:00 GMT</pubDate> | ||
| <product>Agents</product> | ||
| <category>Agents</category> | ||
| <category>Workers</category> | ||
| <category>Workflows</category> | ||
| </item> | ||
| </channel> | ||
| </rss> | ||
| ``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| --- | ||
| pcx_content_type: concept | ||
| title: New features | ||
| sidebar: | ||
| order: 5 | ||
| --- | ||
|
|
||
| At Cloudflare, we are constantly innovating and improving our products. | ||
|
|
||
| The best way to stay up to date with this innovation is to read our [changelog](/changelog/). | ||
|
|
||
| If you prefer to consume these updates in another format, we also offer [RSS feeds](/fundamentals/new-features/available-rss-feeds/). |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.