Skip to content

Commit

Permalink
Print out the blog publish date. (#124)
Browse files Browse the repository at this point in the history
  • Loading branch information
kixelated authored Oct 28, 2024
1 parent 3b229cd commit a50ec3e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions web/src/layouts/global.astro
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ interface Props {
frontmatter?: {
title: string
date: string
}
}
Expand Down Expand Up @@ -49,6 +50,13 @@ if (frontmatter && frontmatter.title) title = frontmatter.title
</div>
</nav>
<article class="markdown">
{
frontmatter?.date && (
<p class="text-sm text-gray-400 text-right">
published {new Date(frontmatter.date).toLocaleDateString()}
</p>
)
}
<slot />
</article>
</div>
Expand Down

0 comments on commit a50ec3e

Please sign in to comment.