feat(www): content changes

This commit is contained in:
Musa 2025-11-26 14:44:18 -08:00
parent 98fb8cb2fd
commit 337950bcdb
8 changed files with 70 additions and 14 deletions

View file

@ -46,11 +46,28 @@ export async function generateMetadata({
};
}
const baseUrl =
process.env.NEXT_PUBLIC_BASE_URL ||
(process.env.VERCEL_URL
? `https://${process.env.VERCEL_URL}`
: "http://localhost:3000");
// Get baseUrl - use NEXT_PUBLIC_APP_URL if set, otherwise construct from VERCEL_URL
// Restrict to allowed hosts: localhost:3000, archgw-tau.vercel.app, or plano.katanemo.com
let baseUrl = "http://localhost:3000";
if (process.env.NEXT_PUBLIC_APP_URL) {
const url = process.env.NEXT_PUBLIC_APP_URL;
if (
url.includes("archgw-tau.vercel.app") ||
url.includes("plano.katanemo.com") ||
url.includes("localhost:3000")
) {
baseUrl = url;
}
} else if (process.env.VERCEL_URL) {
const hostname = process.env.VERCEL_URL;
// VERCEL_URL is just the hostname, not the full URL
if (hostname === "archgw-tau.vercel.app") {
baseUrl = `https://${hostname}`;
} else if (hostname === "plano.katanemo.com") {
baseUrl = `https://${hostname}`;
}
}
const ogImageUrl = `${baseUrl}/api/og/${resolvedParams.slug}`;

View file

@ -1,7 +1,7 @@
import type { Metadata } from "next";
import "@katanemo/shared-styles/globals.css";
import { Analytics } from "@vercel/analytics/next";
import { Navbar, Footer } from "@katanemo/ui";
import { ConditionalLayout } from "@/components/ConditionalLayout";
export const metadata: Metadata = {
title: "Plano - The AI-native network for agents",
@ -17,11 +17,7 @@ export default function RootLayout({
return (
<html lang="en">
<body className="antialiased">
<div className="min-h-screen">
<Navbar />
<main className="pt-20">{children}</main>
<Footer />
</div>
<ConditionalLayout>{children}</ConditionalLayout>
<Analytics />
</body>
</html>

View file

@ -0,0 +1,12 @@
export default function StudioLayout({
children,
}: {
children: React.ReactNode;
}) {
return (
<div className="fixed inset-0 h-screen w-screen overflow-hidden">
{children}
</div>
);
}

View file

@ -0,0 +1,26 @@
"use client";
import { usePathname } from "next/navigation";
import { Navbar, Footer } from "@katanemo/ui";
export function ConditionalLayout({
children,
}: {
children: React.ReactNode;
}) {
const pathname = usePathname();
const isStudio = pathname?.startsWith("/studio");
if (isStudio) {
return <>{children}</>;
}
return (
<div className="min-h-screen">
<Navbar />
<main className="pt-20">{children}</main>
<Footer />
</div>
);
}

View file

@ -19,8 +19,8 @@ const customerLogos = [
src: "/logos/sandisk.svg",
},
{
name: "Oracle",
src: "/logos/oracle.svg",
name: "HP",
src: "/logos/hp.svg",
},
];