Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

fix(web): fix SEO slug layout double document wrapper

Richie McIlroy1e896e99b484
diff --git a/apps/web/app/(site)/[slug]/layout.tsx b/apps/web/app/(site)/[slug]/layout.tsx
index 7e8e1632f..e61e40356 100644
--- a/apps/web/app/(site)/[slug]/layout.tsx
+++ b/apps/web/app/(site)/[slug]/layout.tsx
@@ -1,16 +1,10 @@
-export const metadata = {
- title: "Next.js",
- description: "Generated by Next.js",
-};
+import type { ReactNode } from "react";
-export default function RootLayout({
- children,
-}: {
- children: React.ReactNode;
-}) {
- return (
- <html lang="en">
- <body>{children}</body>
- </html>
- );
+// SEO content is served by physical App Router pages under app/(site)/(seo) and
+// app/(site)/solutions — those are the source of truth. This dynamic [slug]
+// route is only a registry-backed fallback, so its layout must NOT render its
+// own <html>/<body> (the root app/layout.tsx already does that) or set
+// placeholder metadata. Pass children straight through to the parent layout.
+export default function SeoSlugLayout({ children }: { children: ReactNode }) {
+ return children;
}