diff --git a/src/pages/tags/index.astro b/src/pages/tags/index.astro index edddb93..ad1426c 100644 --- a/src/pages/tags/index.astro +++ b/src/pages/tags/index.astro @@ -6,13 +6,12 @@ const tags = await getTaxonomy("post", "tags"); const textClasses: string[] = [ "text-3xl text-cyan-400 capitalize", + "text-2xl text-pink-400 capitalize", + "text-2xl text-purple-400 capitalize", "text-xl text-teal-400 capitalize", - "text-md text-red-400 capitalize", "text-lg text-green-400 capitalize", - "text-sm text-orange-400 capitalize", "text-lg text-zinc-400 capitalize", "text-4xl text-red-400 capitalize", - "text-xs text-cyan-400 capitalize", ]; const getRandomClass = (classList: string[]): string => { diff --git a/src/utils/getAllTags.ts b/src/utils/getAllTags.ts index 7f4250c..b07aa23 100644 --- a/src/utils/getAllTags.ts +++ b/src/utils/getAllTags.ts @@ -35,8 +35,13 @@ export const getTaxonomy = async (collection: string, name: string) => { }); } } - const taxonomy = [...new Set(taxonomies)]; - return taxonomy; + const taxonomyMap = new Map(); + taxonomies.forEach((taxonomy) => { + if (!taxonomyMap.has(taxonomy.name)) { + taxonomyMap.set(taxonomy.name, taxonomy); + } + }); + return Array.from(taxonomyMap.values()); }; export const getSinglePage = async (collection: any) => {