Skip to content

Commit 2f0a56f

Browse files
committed
wip
1 parent 6bbc862 commit 2f0a56f

File tree

2 files changed

+38
-55
lines changed

2 files changed

+38
-55
lines changed

src/content/release-notes/2024/11/27/stuff-and-things.mdx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,13 @@ products:
77
tags: changed
88
---
99

10-
## Foo
10+
![Turnstile Overview](~/assets/images/turnstile/turnstile-overview.png)
11+
12+
##### Foo
1113

1214
Aenean lectus sapien, sollicitudin eget condimentum quis, vehicula sed risus. Maecenas consectetur nisi nec nisi sagittis lacinia.
1315

14-
## Bar
16+
##### Bar
1517

1618
:::note
1719
Phasellus non sagittis urna.

src/pages/release-notes/index.astro

Lines changed: 34 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -6,78 +6,55 @@ import { format } from "date-fns";
66
77
const notes = await getCollection("release-notes");
88
9-
const months = Object.entries(
10-
Object.groupBy(notes, (note) => note.id.split("/").slice(0, 2).join("/")),
11-
);
12-
139
const days = Object.entries(
1410
Object.groupBy(notes, (note) => note.id.split("/").slice(0, 3).join("/")),
1511
);
16-
17-
const sidebar = [
18-
{
19-
label: "release-notes",
20-
items: [
21-
{
22-
label: "Latest releases",
23-
link: "/release-notes/",
24-
},
25-
...months.map(([date, entries]) => {
26-
return {
27-
label: format(date, "MMMM yyyy"),
28-
items: entries
29-
?.sort()
30-
.reverse()
31-
.map((entry) => {
32-
const date = entry.id.split("/").slice(0, 3).join("/");
33-
const formatted = format(date, "MMMM dd");
34-
35-
return {
36-
label: `${formatted} - ${entry.data.title}`,
37-
link: `/release-notes/${entry.slug}/`,
38-
};
39-
}),
40-
};
41-
})
42-
]
43-
},
44-
];
4512
---
4613

4714
<StarlightPage
48-
frontmatter={{ title: "Release notes", tableOfContents: false }}
49-
sidebar={sidebar}
15+
frontmatter={{ title: "Release notes", tableOfContents: false, template: "splash" }}
16+
hideTitle={true}
5017
hideBreadcrumbs={true}
5118
>
52-
<LinkButton href="/release-notes/rss.xml" icon="rss" style={{ padding: "0.4375rem 1.125rem" }}>RSS</LinkButton>
53-
<div class="grid grid-cols-[10%_90%]">
19+
<div class="flex mb-20">
20+
<div class="flex flex-col">
21+
<h1>Changelog</h1>
22+
<p>New updates and improvements at Cloudflare.</p>
23+
</div>
24+
</div>
25+
<!-- <LinkButton href="/release-notes/rss.xml" icon="rss" style={{ padding: "0.4375rem 1.125rem" }}>RSS</LinkButton> -->
26+
<div class="grid grid-cols-[10%_90%] justify-self-center">
5427
{
5528
days.sort().reverse().map(([date, entries]) => {
5629
const formatted = format(date, "MMMM dd");
5730

5831
return (
5932
<div class="!mt-0">
60-
<p class="text-xs">{formatted}</p>
33+
<strong class="text-xs">{formatted}</strong>
34+
<p class="text-xs">12:00PM</p>
6135
</div>
6236
<Steps>
63-
<ol class="!mt-0">
37+
<ol class="!mt-0 max-w-3xl">
6438
{
65-
entries?.map((entry) => (
66-
<li>
67-
<a href={`/release-notes/${entry.slug}/`}>
68-
<strong>
69-
{entry.data.title}
70-
</strong>
71-
</a>
72-
<p>{entry.data.description}</p>
73-
<div class="flex gap-2 items-center">
39+
entries?.map(async (entry) => {
40+
const { Content } = await entry.render();
41+
42+
return (
43+
<li>
44+
<a href={`/release-notes/${entry.slug}/`} class="no-underline hover:underline">
45+
<h3 class="text-[var(--sl-color-text)]">
46+
{entry.data.title}
47+
</h3>
48+
</a>
7449
<span class="ml-1 bg-orange-200 text-orange-900 rounded-full px-2 py-0.5 text-xs">
75-
{entry.data.tags}
50+
{entry.data.products.join(", ")}
7651
</span>
77-
<p class="text-xs">{entry.data.products.join(", ")}</p>
78-
</div>
79-
</li>
80-
))
52+
<p>
53+
<Content />
54+
</p>
55+
</li>
56+
)
57+
})
8158
}
8259
</ol>
8360
</Steps>
@@ -91,4 +68,8 @@ const sidebar = [
9168
.sl-steps > li::before {
9269
content: "";
9370
}
71+
72+
:root {
73+
--sl-content-width: 70rem !important;
74+
}
9475
</style>

0 commit comments

Comments
 (0)