This commit is contained in:
Sergey Yarkov 2023-02-22 20:07:39 +03:00
parent 581dbf8c89
commit 2662a4afc7
No known key found for this signature in database
GPG Key ID: E91CE1FABC619B6F

View File

@ -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);
---