diff --git a/src/components/ArchivePanel.astro b/src/components/ArchivePanel.astro index 7fb180b..9a59a9d 100644 --- a/src/components/ArchivePanel.astro +++ b/src/components/ArchivePanel.astro @@ -20,7 +20,7 @@ if (Array.isArray(tags) && tags.length > 0) { if (Array.isArray(categories) && categories.length > 0) { posts = posts.filter(post => - Array.isArray(post.data.categories) && post.data.categories.some(category => categories.includes(category)) + post.data.category && categories.includes(post.data.category) ); } diff --git a/src/components/PostMetadata.astro b/src/components/PostMetadata.astro index 2db87ef..d09b51b 100644 --- a/src/components/PostMetadata.astro +++ b/src/components/PostMetadata.astro @@ -8,10 +8,9 @@ interface Props { class: string; published: Date; tags: string[]; - categories: string[]; category: string; } -const {published, tags, categories} = Astro.props; +const {published, tags, category} = Astro.props; const className = Astro.props.class; --- @@ -25,23 +24,21 @@ const className = Astro.props.class; {formatDateToYYYYMMDD(published)} - +