Skip to content

Commit 8215a07

Browse files
myakuraGregBrimble
andauthored
Use HTML <time> elements for dates in changelog (#21239)
* Use HTML `<time>` elements for dates in changelog Use semantic `<time>` to enhance machine readability. * Update src/pages/changelog/[...slug].astro * Update src/pages/changelog/[...slug].astro --------- Co-authored-by: Greg Brimble <[email protected]>
1 parent b3a03ce commit 8215a07

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/pages/changelog/[...slug].astro

+2-2
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,10 @@ const props = {
5252
<div>
5353
<h2>{note.data.title}</h2>
5454
<div>
55-
<strong
55+
<time class="font-bold" datetime={note.data.date.toISOString()}
5656
>{format(note.data.date, "MMM dd, yyyy")}, {
5757
format(note.data.date, "hh:mm a")
58-
}</strong
58+
}</time
5959
>
6060
<ProductPills products={note.data.products} />
6161
</div>

src/pages/changelog/index.astro

+2-2
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@ const props = {
4646
>
4747
<time
4848
datetime={entry.data.date.toISOString()}
49-
class="whitespace-nowrap leading-6 sm:pr-4 sm:text-right"
49+
class="whitespace-nowrap text-xs font-bold leading-6 sm:pr-4 sm:text-right"
5050
>
51-
<strong class="text-xs">{date}</strong>
51+
{date}
5252
</time>
5353
<Steps>
5454
<ol class="!mt-0 overflow-x-auto">

0 commit comments

Comments
 (0)