15 lines
589 B
Plaintext
15 lines
589 B
Plaintext
---
|
|||
|
|
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>
|