diff options
| author | Dawid Rycerz <dawid@rycerz.xyz> | 2026-01-13 15:31:19 +0100 |
|---|---|---|
| committer | Dawid Rycerz <dawid@rycerz.xyz> | 2026-01-13 15:39:07 +0100 |
| commit | 52411f6cb9efc10dd683096b34e5c279a11f7e0a (patch) | |
| tree | fd5e71902fbebe2e3f014c7ebb5f153fc8c7d1e7 /src/pages/micro/rss.xml.ts | |
| parent | 26ffc44ee72522891b4fdacac15134dfcf9c4859 (diff) | |
Rework how tags are working and make them native
Diffstat (limited to 'src/pages/micro/rss.xml.ts')
| -rw-r--r-- | src/pages/micro/rss.xml.ts | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/pages/micro/rss.xml.ts b/src/pages/micro/rss.xml.ts index 37d7d39..9356341 100644 --- a/src/pages/micro/rss.xml.ts +++ b/src/pages/micro/rss.xml.ts @@ -4,8 +4,10 @@ import type { APIContext } from "astro"; import { siteConfig } from "@/site.config"; export const GET = async (context: APIContext) => { - // Get only Pleroma posts - const allMicro = await getCollection("micro").catch(() => []); // Fallback to empty array if micro collection fails + // Get only Pleroma posts tagged with "micro" + const allMicro = await getCollection("micro", ({ data }) => data.tags?.includes("micro")).catch( + () => [], + ); // Fallback to empty array if micro collection fails // Sort all micro posts const allMicroPosts = allMicro.sort( |
