···44// import Tags from "./Tags.astro";
55import type { CollectionEntry } from "astro:content";
6677-const posts = (await getCollection("blog")).sort(
88- (a, b) => b.data.publish_date.valueOf() - a.data.publish_date.valueOf(),
99-);
77+interface Props {
88+ limit?: number;
99+}
1010+1111+const { limit = Infinity } = Astro.props;
1212+1313+const posts = (await getCollection("blog"))
1414+ .sort((a, b) => b.data.publish_date.valueOf() - a.data.publish_date.valueOf())
1515+ .slice(0, limit);
10161117type Post = CollectionEntry<"blog">;
1218
+1-1
src/consts.ts
···11// Place any global data in this file.
22// You can import this data from anywhere in your site by using the `import` keyword.
3344-export const SITE_TITLE = "vixalien´s blog";
44+export const SITE_TITLE = "vixalien´s site";
55export const SITE_DESCRIPTION = "Welcome to my website!";
66export const AUTHOR = "vixalien";
77export const PUBLISH_YEAR = new Date().getFullYear();