diff --git a/src/components/Tags.astro b/src/components/Tags.astro
index fd1ff34d..134dab0d 100644
--- a/src/components/Tags.astro
+++ b/src/components/Tags.astro
@@ -6,6 +6,7 @@ interface Props {
tags?: string[];
}
const allResources = await getCollection("resources");
+const allTags = await getCollection("tags")
const referer = Astro.request.headers.get("referer");
const tagsParams =
@@ -19,13 +20,13 @@ const { tags } = Astro.props;
// Determine which tags to display
const filteredTags =
tags && tags.length > 0
- ? allTags.filter((tag) => tags.includes(tag))
+ ? allTags.filter((tag) => tags.includes(tag.id))
: allTags;
const style = allTags
.map(
(tag) =>
- `.sl-markdown-content:has([data-tag=${JSON.stringify(tag)}]:checked) .card-wrapper[data-tags*=${JSON.stringify(tag)}] { display: block; }`,
+ `.sl-markdown-content:has([data-tag=${JSON.stringify(tag.id)}]:checked) .card-wrapper[data-tags*=${JSON.stringify(tag.id)}] { display: block; }`,
)
.join("\n");
---
@@ -79,12 +80,12 @@ const style = allTags
-
+
))
}
@@ -95,7 +96,7 @@ const style = allTags
{
allResources.map((r) => (
-