Commit 969b121
Changed files (2)
src
components
widgets
src/components/widgets/PostCard.astro
@@ -1,6 +1,7 @@
---
import { siteConfig } from '@/config';
import { getCategoryUrl, getTagUrl } from '@utils/content-utils';
+import type { ImageMetadata } from 'astro';
import MetaIcon from './MetaIcon.astro';
import PostCardCover from './PostCardCover.astro';
import ReadMoreButton from './ReadMoreButton.astro';
@@ -13,7 +14,7 @@ interface Props {
updated?: Date;
tags: string[];
category?: string;
- cover?: string;
+ cover?: string | ImageMetadata;
description: string;
}
src/components/widgets/PostCardCover.astro
@@ -1,11 +1,12 @@
---
import ImageWrapper from '@components/utils/ImageWrapper.astro';
+import type { ImageMetadata } from 'astro';
import { Icon } from 'astro-icon/components';
interface Props {
url: string;
title: string;
- cover: string;
+ cover: string | ImageMetadata;
}
const { url, title, cover } = Astro.props;