Add an opt-in SSR mode with a Node adapter behind PUBLIC_SSR

This commit is contained in:
dtonon 2026-08-14 19:25:55 +01:00
parent 9cc82dc1fe
commit 54c0682dce
18 changed files with 4257 additions and 3552 deletions

View file

@ -179,7 +179,9 @@
<link rel="icon" href={favicon} />
</svelte:head>
{#if relayAccess.state !== "open"}
<!-- The server and the pre-probe client render the forum; the gate only
replaces it once a probe confirms the relay refuses this visitor. -->
{#if relayAccess.state !== "open" && relayAccess.state !== "checking"}
<RelayGate />
{:else}
<div

View file

@ -1 +1,3 @@
export const ssr = false;
import { SSR_ENABLED } from "$lib/config";
export const ssr = SSR_ENABLED;

View file

@ -30,7 +30,7 @@
import MessageEditor from "$lib/components/MessageEditor.svelte";
import PostContent from "$lib/components/PostContent.svelte";
import Tag from "$lib/components/Tag.svelte";
import { type NostrUser } from "@nostr/gadgets/metadata";
import type { NostrUser } from "$lib/gadgets";
type Author = { pubkey: string; name: string; picture?: string };