feat: Implement dynamic node title metadata and enhance swarm user and post hydration.

This commit is contained in:
Christomatt
2026-01-26 17:09:21 +01:00
parent 3ba60cadf5
commit cf0dfa4b66
12 changed files with 380 additions and 105 deletions
+28 -10
View File
@@ -13,16 +13,34 @@ const sairaCondensed = Saira_Condensed({
variable: "--font-saira",
});
export const metadata: Metadata = {
title: "Synapsis",
description: "Synapsis is designed to function like a global signal layer rather than a culture-bound platform. Anyone can run their own node and still participate in a shared, interconnected network, with global identity, clean terminology, and a modern interface that feels current rather than experimental.",
manifest: "/manifest.json",
icons: {
icon: "/api/favicon",
},
themeColor: "#0a0a0a",
viewport: "width=device-width, initial-scale=1, maximum-scale=1",
};
import { db } from "@/db";
export async function generateMetadata(): Promise<Metadata> {
let title = "Synapsis";
try {
const node = await db.query.nodes.findFirst();
if (node?.name) {
title = node.name;
}
} catch (e) {
console.error("Failed to fetch node info for metadata", e);
}
return {
title: {
default: title,
template: `%s | ${title}`,
},
description: "Synapsis is designed to function like a global signal layer rather than a culture-bound platform. Anyone can run their own node and still participate in a shared, interconnected network, with global identity, clean terminology, and a modern interface that feels current rather than experimental.",
manifest: "/manifest.json",
icons: {
icon: "/api/favicon",
},
themeColor: "#0a0a0a",
viewport: "width=device-width, initial-scale=1, maximum-scale=1",
};
}
// Force all routes to be dynamic (no static generation at build time)
// This is appropriate for a social network where all content is user-generated