diff options
Diffstat (limited to 'src/components/BlogPost.astro')
| -rw-r--r-- | src/components/BlogPost.astro | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/components/BlogPost.astro b/src/components/BlogPost.astro new file mode 100644 index 0000000..0070f2b --- /dev/null +++ b/src/components/BlogPost.astro @@ -0,0 +1,14 @@ +--- +const { post } = Astro.props; +const date: Date = new Date(post.frontmatter.date); +--- + +<a class="block" href={post.url}> + <h2> + {post.frontmatter.title}<span class="text-xs no-underline"> + {date.toLocaleDateString("de-DE")}</span + > + </h2> + <p>{post.frontmatter.description}</p> + <p class="text-xs">Tags: {post.frontmatter.tags.join(", ")}</p> +</a> |
