add videos page, new video
This commit is contained in:
@@ -4,27 +4,32 @@ import Layout from "@/layouts/Layout.astro";
|
||||
import { sortContentByDate } from "@/utils/sorts";
|
||||
import { getCollection } from "astro:content";
|
||||
|
||||
const pageData = {
|
||||
title: "Blog",
|
||||
description: "Long format about thoughts and other topics.",
|
||||
};
|
||||
|
||||
const allPosts = await getCollection("blog", ({ data }) => data.draft !== true);
|
||||
sortContentByDate(allPosts);
|
||||
---
|
||||
|
||||
<Layout title="Blog" description="Check my projects.">
|
||||
<section class="prose prose-invert">
|
||||
<h1>Blog</h1>
|
||||
<p>Long format about thoughts and other topics.</p>
|
||||
</section>
|
||||
<ul class="mt-4 flex flex-col gap-4">
|
||||
{
|
||||
allPosts.map((blogpost: any) => (
|
||||
<li>
|
||||
<PostItem
|
||||
type="blog"
|
||||
slug={blogpost.slug}
|
||||
date={blogpost.data.date!}
|
||||
title={blogpost.data.title!}
|
||||
/>
|
||||
</li>
|
||||
))
|
||||
}
|
||||
</ul>
|
||||
<Layout {...pageData}>
|
||||
<section class="prose prose-invert">
|
||||
<h1>{pageData.title}</h1>
|
||||
<p>{pageData.description}</p>
|
||||
</section>
|
||||
<ul class="mt-4 flex flex-col gap-4">
|
||||
{
|
||||
allPosts.map((blogpost: any) => (
|
||||
<li>
|
||||
<PostItem
|
||||
type="blog"
|
||||
slug={blogpost.slug}
|
||||
date={blogpost.data.date!}
|
||||
title={blogpost.data.title!}
|
||||
/>
|
||||
</li>
|
||||
))
|
||||
}
|
||||
</ul>
|
||||
</Layout>
|
||||
|
Reference in New Issue
Block a user