mirror of
https://github.com/10h30/blog-balodeplao.git
synced 2026-05-12 23:21:16 +09:00
feat: add TypeScript interfaces for blog, category, destination, and tag pages
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user