From 337950bcdbfe04a04e9f7eefb38f2a922e1641fe Mon Sep 17 00:00:00 2001 From: Musa Date: Wed, 26 Nov 2025 14:44:18 -0800 Subject: [PATCH] feat(www): content changes --- apps/www/public/logos/hp.svg | 4 +++ apps/www/public/logos/oracle.svg | 1 - apps/www/sanity.config.ts | 2 ++ apps/www/src/app/blog/[slug]/layout.tsx | 27 +++++++++++++++---- apps/www/src/app/layout.tsx | 8 ++---- apps/www/src/app/studio/layout.tsx | 12 +++++++++ apps/www/src/components/ConditionalLayout.tsx | 26 ++++++++++++++++++ apps/www/src/components/LogoCloud.tsx | 4 +-- 8 files changed, 70 insertions(+), 14 deletions(-) create mode 100644 apps/www/public/logos/hp.svg delete mode 100644 apps/www/public/logos/oracle.svg create mode 100644 apps/www/src/app/studio/layout.tsx create mode 100644 apps/www/src/components/ConditionalLayout.tsx diff --git a/apps/www/public/logos/hp.svg b/apps/www/public/logos/hp.svg new file mode 100644 index 00000000..e53232c8 --- /dev/null +++ b/apps/www/public/logos/hp.svg @@ -0,0 +1,4 @@ + + + + diff --git a/apps/www/public/logos/oracle.svg b/apps/www/public/logos/oracle.svg deleted file mode 100644 index 0981dfcf..00000000 --- a/apps/www/public/logos/oracle.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/apps/www/sanity.config.ts b/apps/www/sanity.config.ts index 9396c036..d6df61f6 100644 --- a/apps/www/sanity.config.ts +++ b/apps/www/sanity.config.ts @@ -9,6 +9,8 @@ export default defineConfig({ projectId: "71ny25bn", dataset: "production", + basePath: "/studio", + plugins: [structureTool()], schema: { diff --git a/apps/www/src/app/blog/[slug]/layout.tsx b/apps/www/src/app/blog/[slug]/layout.tsx index 4a4d1681..1c26b94d 100644 --- a/apps/www/src/app/blog/[slug]/layout.tsx +++ b/apps/www/src/app/blog/[slug]/layout.tsx @@ -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}`; diff --git a/apps/www/src/app/layout.tsx b/apps/www/src/app/layout.tsx index 33340968..dcf4fbff 100644 --- a/apps/www/src/app/layout.tsx +++ b/apps/www/src/app/layout.tsx @@ -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 ( -
- -
{children}
-
-
+ {children} diff --git a/apps/www/src/app/studio/layout.tsx b/apps/www/src/app/studio/layout.tsx new file mode 100644 index 00000000..0ff56d7e --- /dev/null +++ b/apps/www/src/app/studio/layout.tsx @@ -0,0 +1,12 @@ +export default function StudioLayout({ + children, +}: { + children: React.ReactNode; +}) { + return ( +
+ {children} +
+ ); +} + diff --git a/apps/www/src/components/ConditionalLayout.tsx b/apps/www/src/components/ConditionalLayout.tsx new file mode 100644 index 00000000..dc81d1f6 --- /dev/null +++ b/apps/www/src/components/ConditionalLayout.tsx @@ -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 ( +
+ +
{children}
+
+ ); +} + diff --git a/apps/www/src/components/LogoCloud.tsx b/apps/www/src/components/LogoCloud.tsx index 9ad53f75..5d271339 100644 --- a/apps/www/src/components/LogoCloud.tsx +++ b/apps/www/src/components/LogoCloud.tsx @@ -19,8 +19,8 @@ const customerLogos = [ src: "/logos/sandisk.svg", }, { - name: "Oracle", - src: "/logos/oracle.svg", + name: "HP", + src: "/logos/hp.svg", }, ];