mirror of
https://github.com/bitbaum/loki.git
synced 2026-12-04 11:07:40 +01:00
fix(metadata): strip duplicate "— Cockpit" suffix from page titles
Root layout's title template ('%s — Cockpit') was double-suffixing pages
that already embedded "— Cockpit" in their own metadata: PublicProfilePage
("George — Cockpit — Cockpit"), its Not Found variant, and the whitepaper.
Fix at the page level — return just the base text and let the template
append the brand. Verified via curl:
- /u/cat → <title>George — Cockpit</title>
- /whitepaper → <title>Whitepaper — Cockpit</title>
Caught during the browser QA pass on /u/cat.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2 files changed
+5
-3
No files matched your search
@@ -23,9 +23,10 @@ export async function generateMetadata({
|
||||
}): Promise<Metadata> {
|
||||
const { username } = await params;
|
||||
const user = await getUser(username);
|
||||
if (!user) return { title: `Not Found — ${APP_NAME}` };
|
||||
// Root layout's title template appends "— Cockpit" — don't double it here.
|
||||
if (!user) return { title: "Not Found" };
|
||||
return {
|
||||
title: `${user.name ?? username} — ${APP_NAME}`,
|
||||
title: user.name ?? username,
|
||||
description: `${user.name ?? username}'s builder profile on ${APP_NAME}`,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -8,7 +8,8 @@ import { ROUTES } from "@/config/auth";
|
||||
import { APP_NAME } from "@/config/brand";
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: `Whitepaper — ${APP_NAME}`,
|
||||
// Root layout's title template appends "— Cockpit" — don't double it here.
|
||||
title: "Whitepaper",
|
||||
description: "A technical architecture for sustained autonomous execution across many projects simultaneously.",
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user