---
import PostList from "../components/PostList.astro";
import BaseLayout from "../layouts/BaseLayout.astro";
import { join, dirname } from "path";

const currentUrl = Astro.url;
---

<BaseLayout>
  <h2>Blog</h2>

  <PostList basePath={join(dirname(currentUrl.pathname), "posts")} drafts="only" />
</BaseLayout>
