fix: remove duplicate dates on articles
This commit is contained in:
parent
78b0780e12
commit
8eb41f8fa4
28 changed files with 230 additions and 38 deletions
|
@ -9,11 +9,6 @@ import RelatedArticles from "@components/RelatedArticles.astro";
|
|||
const { article, isPost = false } = Astro.props;
|
||||
const { Content } = await article.render();
|
||||
|
||||
let datesMatch = false;
|
||||
if (article.data.date.getTime() == article.data.updated?.getTime()) {
|
||||
datesMatch = true;
|
||||
}
|
||||
|
||||
const listFormatter = new Intl.ListFormat("en-GB", {
|
||||
style: "long",
|
||||
type: "conjunction",
|
||||
|
@ -41,7 +36,7 @@ const listFormatter = new Intl.ListFormat("en-GB", {
|
|||
<div class="flex items-center gap-2">
|
||||
<Icon name="mdi:calendar" />
|
||||
{
|
||||
datesMatch ? (
|
||||
!article.data.updated ? (
|
||||
<p title="Date">
|
||||
<FormattedDate date={article.data.date} />
|
||||
</p>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue