import { Navbar } from "@/components/public/Navbar"; import { Footer } from "@/components/public/Footer"; import { BlogIndex, type BlogPost, type BlogCategory, } from "@/components/public/BlogIndex"; import { BreadcrumbJsonLd } from "@/components/public/JsonLd"; import { apiUrl } from "@/lib/api-base"; const LIMIT = 9; // Render at request time so the first page of posts is in the HTML for crawlers. export const dynamic = "force-dynamic"; async function fetchJson(path: string, fallback: T): Promise { try { const res = await fetch(apiUrl(path), { cache: "no-store" }); if (!res.ok) return fallback; return (await res.json()) as T; } catch { return fallback; } } export default async function BlogPage() { const [{ posts, total }, categories] = await Promise.all([ fetchJson<{ posts: BlogPost[]; total: number }>(`/posts?page=1&limit=${LIMIT}`, { posts: [], total: 0, }), fetchJson("/categories", []), ]); return ( <>

From the Nostr Network

Blog

Curated Bitcoin content from the Nostr network