EN

@core / kit-blog

1.0.1 ▾
verifiedMIT
GitHub

Blog kit for Next.js: posts with authors, categories, tags, series, feeds, moderated comments and newsletter

Code32 filesContext~883 tokensscan passed

The exact tree that will be injected, after .genpmignore. Pinned to

src/app/(blog)/blog/feed.json/route.tsread-only · fa952a4
import { jsonFeed } from '@/lib/blog';
import { getSiteSettings } from '@/lib/site';
import '../../_lib/blog';

export const dynamic = 'force-dynamic'; // se genera en cada petición (con caché HTTP): el build no necesita BD ni SITE_URL

export async function GET(): Promise<Response> {
  const s = await getSiteSettings();
  const body = await jsonFeed({ title: s?.name ?? 'Blog', ...(s?.tagline && { description: s.tagline }), blogPath: '/blog' });
  return new Response(body, { headers: { 'content-type': 'application/feed+json; charset=utf-8', 'cache-control': 'public, max-age=600' } });
}

Report @core/kit-blog

Sign in with GitHub to report a package.