--- import { getCollection } from "astro:content"; import Base from "@layouts/Base.astro"; import KeywordsList from "@components/organisms/KeywordsList.astro"; const title = "Palavras-Chave"; const description = "Palavras-Chave"; const blogs = await getCollection("blog"); const map: Map = new Map(); for (const { data } of blogs) { if (!("keywords" in data)) { continue; } for (const k of data.keywords) { const n = map.get(k) ?? 0; map.set(k, n + 1); } } let keywords = Array.from(map.entries()).sort(([, a], [, b]) => b - a).map(( [x], ) => x); ---

Palavras-Chave