Skip to content
Snippets Groups Projects

feat: implement tag bar in news page

Open Agustina Carrion requested to merge feat/implement-tag-bar into main
7 files
+ 32
4
Compare changes
  • Side-by-side
  • Inline
Files
7
@@ -14,6 +14,7 @@ type Props = MarkdownLayoutProps<{
headerImage: string;
lang?: string;
type?: "article" | "event";
tags?: Array<{ target?: string; title: string }>;
}>;
const { frontmatter, url } = Astro.props as Props;
@@ -24,6 +25,9 @@ if (frontmatter.type === "article") {
rawContent = await Astro.glob<IArticle>("../pages/**/events/*.mdx");
}
const TAGS = rawContent.map((tag) => tag.frontmatter.tags);
console.log(TAGS);
const categoryMapping = {
article: "News",
event: "Event",
@@ -95,6 +99,7 @@ const breadcrumbs = buildBreadcrumbs(breadcrumbItems, url as string, baseUrl);
/>
<main>
<HorizontalCardListView
tags={TAGS}
breadcrumbs={breadcrumbs}
title={frontmatter.title}
subtitle={frontmatter.subtitle}
Loading