From 2662a4afc75fc8403b96e6d076aa9ee93c4933c5 Mon Sep 17 00:00:00 2001 From: sergeyyarkov Date: Wed, 22 Feb 2023 20:07:39 +0300 Subject: [PATCH] fix tags --- src/templates/Articles.astro | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/templates/Articles.astro b/src/templates/Articles.astro index a15e7a4..07abe82 100644 --- a/src/templates/Articles.astro +++ b/src/templates/Articles.astro @@ -9,7 +9,7 @@ import ArticlesList from "@root/components/ArticlesList"; const t = useTranslation(Astro); const pageLang = getLanguageFromURL(Astro.url.pathname); const articles = await getCollection("blog", (e) => !e.data.draft); -const tags = utils.getUniqueTags(articles); +const tags = Array.from(new Set((await getCollection("tags")).map((t) => t.data.title))); const filtered = utils.removeDuplicates(articles, pageLang); const canonicalUrl = new URL(Astro.url.pathname, Astro.site); ---