Publishes Done With Crypto
This commit is contained in:
@@ -18,5 +18,9 @@ export async function getPublishedPosts(
|
||||
export async function getAllTags(): Promise<string[]> {
|
||||
const posts = await getCollection("blog", publishedOnly);
|
||||
|
||||
return posts.flatMap((p) => p.data.tags || []);
|
||||
return Object.keys(
|
||||
Object.fromEntries(
|
||||
posts.flatMap((p) => p.data.tags || []).map((t) => [t, 1]),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user