diff --git a/apps/www/public/favicon.svg b/apps/www/public/favicon.svg index 8eb5cc97..2773d31f 100644 --- a/apps/www/public/favicon.svg +++ b/apps/www/public/favicon.svg @@ -1,8 +1,8 @@ - - - + + + + + Layer 1 + + + \ No newline at end of file diff --git a/apps/www/src/components/BlogHeader.astro b/apps/www/src/components/BlogHeader.astro index 38e4f1ca..0ac53e62 100644 --- a/apps/www/src/components/BlogHeader.astro +++ b/apps/www/src/components/BlogHeader.astro @@ -1,8 +1,4 @@ --- -import { getCategories } from "@/lib/fetchers"; - -const categories = await getCategories(); - type Props = { title: string; }; diff --git a/apps/www/src/lib/fetchers.ts b/apps/www/src/lib/fetchers.ts index 91c03ad8..a94e1d72 100644 --- a/apps/www/src/lib/fetchers.ts +++ b/apps/www/src/lib/fetchers.ts @@ -1,27 +1,9 @@ import { getCollection } from "astro:content"; -export const getCategories = async () => { - const posts = await getCollection("blog"); - const categories = [ - ...new Set(posts.map((post) => post.data.category).flat()), - ]; - - return categories; -}; - export const getPosts = async () => { const posts = (await getCollection("blog")).sort( (a, b) => b.data.pubDate.valueOf() - a.data.pubDate.valueOf(), ); - - return posts; -}; - -export const getPostsByCategory = async (category: string) => { - const posts = (await getCollection("blog")) - .filter((post) => post.data.category.includes(category)) - .sort((a, b) => b.data.pubDate.valueOf() - a.data.pubDate.valueOf()); - return posts; }; @@ -29,6 +11,5 @@ export const getGuides = async () => { const guides = (await getCollection("guides")) .filter((guide) => guide.data.published) .sort((a, b) => b.data.pubDate.valueOf() - a.data.pubDate.valueOf()); - return guides; };