feat: add TypeScript interfaces for blog, category, destination, and tag pages

This commit is contained in:
Thuan Bui
2026-03-19 18:27:26 +07:00
parent f931b542ad
commit f140fb53d3
5 changed files with 54 additions and 6 deletions
+6 -2
View File
@@ -7,7 +7,11 @@ import Destinations from "@/components/ui/Destinations.astro";
import { toR2Url } from "@/utils/r2";
import Picture from "@/components/ui/Picture.astro";
import { getCollection, render } from "astro:content";
import { getCollection, render, type CollectionEntry } from "astro:content";
interface Props {
post: CollectionEntry<"blog">;
}
export async function getStaticPaths() {
const blog = await getCollection("blog");
@@ -17,7 +21,7 @@ export async function getStaticPaths() {
}));
}
const { post } = Astro.props;
const { post } = Astro.props as Props;
const { Content, remarkPluginFrontmatter } = await render(post);
const {
title,