Skip to content

Commit b258d61

Browse files
committed
[Docs site] Collapse some release notes
1 parent 939dd2b commit b258d61

File tree

3 files changed

+76
-4
lines changed

3 files changed

+76
-4
lines changed
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
---
2+
import { getChangelogs, type GetChangelogsOptions } from "~/util/changelog";
3+
import { reference } from "astro:content";
4+
import { z } from "astro:schema";
5+
import { getCollection, render } from "astro:content";
6+
import { slug } from "github-slugger";
7+
import RSSButton from "~/components/RSSButton.astro";
8+
import AnchorHeading from "~/components/AnchorHeading.astro";
9+
import { format } from "date-fns";
10+
const props = z
11+
.object({
12+
product: reference("products"),
13+
})
14+
.or(
15+
z.object({
16+
area: z.string(),
17+
}),
18+
);
19+
const input = await props.parseAsync(Astro.props);
20+
let filter: GetChangelogsOptions["filter"];
21+
let rss: string;
22+
if ("product" in input) {
23+
rss = `/changelog/rss/${input.product.id}.xml`;
24+
filter = (e) => {
25+
return e.data.products.some(({ id }) => id === input.product.id);
26+
};
27+
} else {
28+
rss = `/changelog/rss/${slug(input.area)}.xml`;
29+
const products = await getCollection("products", (e) => {
30+
return e.data.product.group === input.area;
31+
});
32+
filter = (e) => {
33+
return e.data.products.some((x) => products.some((y) => x.id === y.id));
34+
};
35+
}
36+
console.log(rss)
37+
const changelogs = await getChangelogs({ filter });
38+
---
39+
40+
<RSSButton href={rss} />
41+
42+
{
43+
changelogs.map(async (entry) => {
44+
45+
46+
const { Content } = await render(entry);
47+
return (
48+
<AnchorHeading depth={2} title={format(entry.data.date, "yyyy-MM-dd")} />
49+
<Content />
50+
);
51+
})
52+
}

src/components/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ export { default as PagesBuildPresetsTable } from "./PagesBuildPresetsTable.astr
4242
export { default as PagesLanguageSupport } from "./PagesLanguageSupport.astro";
4343
export { default as Plan } from "./Plan.astro";
4444
export { default as PlanInfo } from "./PlanInfo.astro";
45+
export { default as ProductChangelog } from "./ProductChangelog.astro";
4546
export { default as ProductReleaseNotes } from "./ProductReleaseNotes.astro";
4647
export { default as ProductFeatures } from "./ProductFeatures.astro";
4748
export { default as ProductsByTag } from "./ProductsByTag.astro";

src/content/docs/dns/changelog.mdx

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,33 @@
11
---
22
pcx_content_type: changelog
33
title: Changelog
4-
release_notes_file_name:
5-
- dns
64
sidebar:
75
order: 25
86
---
97

10-
import { ProductReleaseNotes } from "~/components";
8+
import { ProductChangelog } from "~/components";
119

1210
{/* <!-- Actual content lives in /src/content/release-notes/dns.yaml. Update the file there for new entries to appear here. For more details, refer to https://developers.cloudflare.com/style-guide/documentation-content-strategy/content-types/changelog/#yaml-file --> */}
1311

14-
<ProductReleaseNotes />
12+
<ProductChangelog product="dns"/>
13+
14+
## 2025-01-27
15+
16+
**Zone IDs and names on individual DNS records**
17+
18+
Records returned by the API will no longer contain the `zone_id` and `zone_name` fields. This change may take up to four weeks to fully roll out. The affected fields were deprecated with an End of Life (EOL) date of November 30, 2024.
19+
20+
## 2024-10-15
21+
22+
**Quote validation for TXT records added via dashboard**
23+
24+
When creating [TXT records](/dns/manage-dns-records/reference/dns-record-types/#txt) via the dashboard you will now find:
25+
26+
* Field validation errors if double quotes `"` are added inconsistently.
27+
* Automatically quoted TXT content upon save if no quotes exist in the record content field.
28+
29+
## 2024-10-07
30+
31+
**API support for per-record CNAME flattening**
32+
33+
Paid zones now have the option to flatten specific CNAME records. When using the API, specify the setting `cname_flatten` as `true` or `false`. Refer to the [documentation](/dns/cname-flattening/set-up-cname-flattening/#per-record) for details.

0 commit comments

Comments
 (0)