Initial Commit
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
---
|
||||
import BaseLayout from '@/layouts/BaseLayout.astro';
|
||||
import Masthead from '@/components/Masthead.astro';
|
||||
import PostList from '@/components/PostList.astro';
|
||||
import { getPublicPosts, POSTS_PER_PAGE } from '@/lib/content';
|
||||
import { siteConfig } from '@/site.config';
|
||||
const posts = await getPublicPosts();
|
||||
const total = Math.max(1, Math.ceil(posts.length / POSTS_PER_PAGE));
|
||||
---
|
||||
|
||||
<BaseLayout navbarOverlay={Boolean(siteConfig.banner.image)}>
|
||||
<Fragment slot="masthead"><Masthead /></Fragment>
|
||||
<PostList posts={posts.slice(0, POSTS_PER_PAGE)} total={total} basePath="" />
|
||||
</BaseLayout>
|
||||
Reference in New Issue
Block a user