Skip to content

Commit 37a9559

Browse files
committed
wip
1 parent f918fe2 commit 37a9559

File tree

5 files changed

+46
-25
lines changed

5 files changed

+46
-25
lines changed

src/content/release-notes/2024/11/13/other-stuff.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ products:
55
- Access
66
- WARP
77
tags: feature
8+
date: 2024-11-13T21:00:00
89
---
910

1011
import { Details } from "~/components";

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ products:
55
- Workers
66
- KV
77
tags: changed
8+
date: 2024-11-27T11:00:00Z
89
---
910

1011
![Turnstile Overview](~/assets/images/turnstile/turnstile-overview.png)

src/pages/release-notes/[...slug].astro

Lines changed: 26 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ import StarlightPage from "@astrojs/starlight/components/StarlightPage.astro";
33
import type { GetStaticPaths } from "astro";
44
import { getCollection } from "astro:content";
55
import { format } from "date-fns";
6-
import { StarlightIcon } from "~/components";
6+
import { Image } from "astro:assets";
7+
import HeroImage from "~/assets/images/release-notes/hero.svg";
78
89
export const getStaticPaths = (async () => {
910
const notes = await getCollection("release-notes");
@@ -20,8 +21,6 @@ export const getStaticPaths = (async () => {
2021
});
2122
}) satisfies GetStaticPaths;
2223
23-
const notes = await getCollection("release-notes");
24-
2524
const { note } = Astro.props;
2625
2726
const { Content, headings } = await note.render();
@@ -36,25 +35,26 @@ const { Content, headings } = await note.render();
3635
hideTitle={true}
3736
hideBreadcrumbs={true}
3837
>
39-
<div class="flex mb-20">
40-
<div class="flex flex-col">
41-
<h1>Changelog</h1>
42-
<p>
43-
New updates and improvements at Cloudflare.
44-
<span>
45-
<a href="/release-notes/feed.rss"> Subscribe to RSS </a>
46-
</span>
47-
</p>
48-
<p>
49-
<StarlightIcon
50-
name="left-arrow"
51-
class="align-middle !inline text-accent"
52-
/>
53-
<a href="/release-notes/" class="no-underline">Back to all posts</a>
54-
</p>
38+
<div class="w-full justify-self-center flex mb-20">
39+
<div class="flex justify-between w-full">
40+
<div class="flex flex-col">
41+
<h1>Changelog</h1>
42+
<p>
43+
New updates and improvements at Cloudflare.
44+
<span>
45+
<a href="/release-notes/feed.rss"> Subscribe to RSS </a>
46+
</span>
47+
</p>
48+
<p>
49+
<a href="/release-notes/" class="no-underline">← Back to all posts</a>
50+
</p>
51+
</div>
52+
<div>
53+
<Image src={HeroImage} alt="hero image" height="175" />
54+
</div>
5555
</div>
5656
</div>
57-
<div class="max-w-3xl w-full justify-self-center">
57+
<div class="w-full justify-self-center">
5858
<h2>{note.data.title}</h2>
5959
<div>
6060
<strong
@@ -73,3 +73,9 @@ const { Content, headings } = await note.render();
7373
</div>
7474
</div>
7575
</StarlightPage>
76+
77+
<style>
78+
:root {
79+
--sl-content-width: 55rem !important;
80+
}
81+
</style>

src/pages/release-notes/index.astro

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
---
22
import StarlightPage from "@astrojs/starlight/components/StarlightPage.astro";
33
import { getCollection } from "astro:content";
4-
import { StarlightIcon, Steps } from "~/components";
4+
import { Steps } from "~/components";
55
import { format } from "date-fns";
6+
import { Image } from "astro:assets";
7+
import HeroImage from "~/assets/images/release-notes/hero.svg";
68
79
const notes = await getCollection("release-notes");
810
@@ -16,19 +18,25 @@ const days = Object.entries(
1618
hideTitle={true}
1719
hideBreadcrumbs={true}
1820
>
19-
<div class="flex mb-20">
21+
<div class="w-full justify-self-center flex mb-20">
22+
<div class="flex justify-between w-full">
2023
<div class="flex flex-col">
2124
<h1>Changelog</h1>
2225
<p>
2326
New updates and improvements at Cloudflare.
2427
<span>
25-
<a href="/release-notes/feed.rss">
26-
Subscribe to RSS
27-
</a>
28+
<a href="/release-notes/feed.rss"> Subscribe to RSS </a>
2829
</span>
2930
</p>
31+
<p>
32+
<a href="/release-notes/" class="no-underline">← Back to all posts</a>
33+
</p>
34+
</div>
35+
<div class="!mt-0">
36+
<Image src={HeroImage} alt="hero image" height="175" />
3037
</div>
3138
</div>
39+
</div>
3240
<div class="grid grid-cols-[10%_90%] justify-self-center">
3341
{
3442
days.sort().reverse().map(([date, entries]) => {
@@ -79,6 +87,10 @@ const days = Object.entries(
7987
</StarlightPage>
8088

8189
<style>
90+
:root {
91+
--sl-content-width: 55rem !important;
92+
}
93+
8294
.sl-steps > li::before {
8395
content: "•";
8496
font-size: calc(var(--bullet-size) * 2);

src/schemas/release-notes.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { z } from "astro:schema";
33
export const releaseNotesSchema = z.object({
44
title: z.string(),
55
description: z.string(),
6+
date: z.coerce.date(),
67
products: z.string().array(),
78
tags: z.enum(["feature", "changed", "improvement"]),
89
});

0 commit comments

Comments
 (0)