Skip to content

Commit

Permalink
Update article excerpt date span to be a time element
Browse files Browse the repository at this point in the history
  • Loading branch information
caendesilva committed Jul 23, 2024
1 parent 84d38c4 commit 0cc1816
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<footer>
@isset($post->date)
<span class="opacity-75">
<span itemprop="dateCreated datePublished">{{ $post->date->short }}</span>{{ isset($post->author) ? ',' : '' }}
<time itemprop="dateCreated datePublished">{{ $post->date->short }}</time>{{ isset($post->author) ? ',' : '' }}
</span>
@endisset
@isset($post->author)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ public function testThereIsNoCommaAfterDateStringWhenThereIsNoAuthor()
'date' => '2022-01-01',
]));

$this->assertStringContainsString('Jan 1st, 2022</span>', $view);
$this->assertStringNotContainsString('Jan 1st, 2022</span>,', $view);
$this->assertStringContainsString('Jan 1st, 2022</time>', $view);
$this->assertStringNotContainsString('Jan 1st, 2022</time>,', $view);
}

public function testThereIsACommaAfterDateStringWhenThereIsAAuthor()
Expand All @@ -71,7 +71,7 @@ public function testThereIsACommaAfterDateStringWhenThereIsAAuthor()
'author' => 'John Doe',
]));

$this->assertStringContainsString('Jan 1st, 2022</span>,', $view);
$this->assertStringContainsString('Jan 1st, 2022</time>,', $view);
}

public function testItempropImageIsNotAddedWhenThereIsNoImage()
Expand Down

0 comments on commit 0cc1816

Please sign in to comment.