|
2 | 2 | import StarlightPage from "@astrojs/starlight/components/StarlightPage.astro"; |
3 | 3 | import type { GetStaticPaths } from "astro"; |
4 | 4 | import { getCollection } from "astro:content"; |
| 5 | +import Header from "~/components/changelogs/Header.astro"; |
| 6 | +import ProductPills from "~/components/changelogs/ProductPills.astro"; |
5 | 7 | import { format } from "date-fns"; |
6 | | -import { Image } from "astro:assets"; |
7 | | -import HeroImage from "~/assets/images/release-notes/hero.svg"; |
8 | 8 |
|
9 | 9 | export const getStaticPaths = (async () => { |
10 | 10 | const notes = await getCollection("release-notes"); |
@@ -35,38 +35,14 @@ const { Content, headings } = await note.render(); |
35 | 35 | hideTitle={true} |
36 | 36 | hideBreadcrumbs={true} |
37 | 37 | > |
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 class="!mt-0"> |
53 | | - <Image src={HeroImage} alt="hero image" height="175" /> |
54 | | - </div> |
55 | | - </div> |
56 | | - </div> |
| 38 | + <Header showBackLink={true} /> |
57 | 39 | <div class="w-full justify-self-center"> |
58 | 40 | <h2>{note.data.title}</h2> |
59 | 41 | <div> |
60 | 42 | <strong |
61 | 43 | >{format(note.id.split("/").slice(0, 3), "MMMM dd")}, 12:00PM</strong |
62 | 44 | > |
63 | | - { |
64 | | - note.data.products.map((product) => ( |
65 | | - <span class="ml-1 bg-orange-200 text-orange-900 rounded-full px-2 py-0.5 text-xs"> |
66 | | - {product} |
67 | | - </span> |
68 | | - )) |
69 | | - } |
| 45 | + <ProductPills products={note.data.products} /> |
70 | 46 | </div> |
71 | 47 | <div> |
72 | 48 | <Content /> |
|
0 commit comments