mirror of
https://github.com/zoriya/v10.git
synced 2026-08-05 05:37:21 +00:00
fix(site): filter devOnly posts from RSS feed (#888)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
20406a024e
commit
16eceb7f47
@@ -4,7 +4,10 @@ import { SITE_DESCRIPTION, SITE_TITLE } from '@/consts';
|
||||
|
||||
// TODO cache idk this can be static
|
||||
export async function GET(context) {
|
||||
const posts = await getCollection('blog');
|
||||
const posts = (await getCollection('blog'))
|
||||
.filter((post) => !post.data.devOnly || import.meta.env.DEV)
|
||||
.sort((a, b) => b.data.pubDate.valueOf() - a.data.pubDate.valueOf());
|
||||
|
||||
return rss({
|
||||
title: SITE_TITLE,
|
||||
description: SITE_DESCRIPTION,
|
||||
|
||||
Reference in New Issue
Block a user