Add auto updating last modified code to blog posts
This commit is contained in:
parent
9c6d49e14f
commit
92992c6142
6 changed files with 36 additions and 3 deletions
|
@ -2,6 +2,7 @@
|
|||
import Partition from "../components/Partition.astro";
|
||||
import BaseLayout from "./BaseLayout.astro";
|
||||
const { frontmatter } = Astro.props;
|
||||
const { lastModified } = Astro.props;
|
||||
---
|
||||
|
||||
<BaseLayout pageTitle={frontmatter.title} description={frontmatter.description}>
|
||||
|
@ -9,7 +10,8 @@ const { frontmatter } = Astro.props;
|
|||
<p>
|
||||
<h1 class="text-xl font-bold underline">{frontmatter.title}</h1>
|
||||
<em>{frontmatter.description}</em><br />
|
||||
<sub>Date: {frontmatter.pubDate.toLocaleDateString()}</sub>
|
||||
<sub>Date: {frontmatter.pubDate.toLocaleDateString()}</sub><br />
|
||||
<sub>Last Modified: {lastModified}</sub>
|
||||
</p>
|
||||
</Partition>
|
||||
<Partition>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue