Skip to content

Instantly share code, notes, and snippets.

@sumitkharche
Created October 14, 2021 15:58
Show Gist options
  • Save sumitkharche/b239bc2c01cfae04c1af5b97584850e0 to your computer and use it in GitHub Desktop.
Save sumitkharche/b239bc2c01cfae04c1af5b97584850e0 to your computer and use it in GitHub Desktop.
---
export interface Props {
post: any;
}
const { post } = Astro.props;
const url = 'posts/'+post.slug;
---
<div class="post-preview">
<a href={url}>
<h2 class="post-title">{post.title}</h2>
<h3 class="post-subtitle">{post.content}</h3>
</a>
<p class="post-meta">
Posted on
{new Date(post.published_at)}
</p>
</div>
<!-- Divider-->
<hr class="my-4" />
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment