Separate default body contents into General layout, keep Base

This commit is contained in:
2023-11-27 20:17:58 -06:00
parent 4aeffb978c
commit a7c5debb5c
4 changed files with 75 additions and 55 deletions

View File

@@ -1,12 +1,12 @@
---
import { getCollection } from "astro:content";
import Base from "@layouts/Base.astro";
import General from "@layouts/General.astro";
import Summary from "@components/Summary.astro";
const posts = await getCollection("blog");
posts.sort((a, b) => new Date(b.data.pubDate).getTime() - new Date(a.data.pubDate).getTime());
---
<Base>
<General>
{
posts.map((post) => (
<Summary