feat: resolve live Nostr references in blog posts and add embeds
Support naddr/nevent/note slugs for unindexed posts, cache naddr lookups, render Nostr embeds in markdown, and add a consistency check for events mirrors. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -10,9 +10,12 @@ 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<T>(path: string, fallback: T): Promise<T> {
|
||||
try {
|
||||
const res = await fetch(apiUrl(path), { next: { revalidate: 300 } });
|
||||
const res = await fetch(apiUrl(path), { cache: "no-store" });
|
||||
if (!res.ok) return fallback;
|
||||
return (await res.json()) as T;
|
||||
} catch {
|
||||
|
||||
Reference in New Issue
Block a user