diff --git a/apps/labfox/app/layout.tsx b/apps/labfox/app/layout.tsx index a8fdcf0..7f253e5 100644 --- a/apps/labfox/app/layout.tsx +++ b/apps/labfox/app/layout.tsx @@ -25,7 +25,9 @@ export const metadata: Metadata = { export default function RootLayout({ children }: Readonly<{ children: React.ReactNode }>) { return ( - {/* Analytics: add the Rybbit script here once a LabFox site id is provisioned. */} +
+ + {children} ); diff --git a/apps/labfox/test/seo.test.tsx b/apps/labfox/test/seo.test.tsx index cfcc689..6f6c331 100644 --- a/apps/labfox/test/seo.test.tsx +++ b/apps/labfox/test/seo.test.tsx @@ -2,13 +2,24 @@ import { createElement } from "react"; import { render, screen } from "@testing-library/react"; import { describe, expect, it } from "vitest"; -import { metadata } from "../app/layout"; +import RootLayout, { metadata } from "../app/layout"; import HomePage from "../app/page"; import { alt as ogAlt, contentType as ogContentType, size as ogSize } from "../app/opengraph-image"; import robots from "../app/robots"; import sitemap from "../app/sitemap"; describe("LabFox technical SEO", () => { + it("configures the approved Rybbit site script", () => { + const layout = RootLayout({ children: null }); + const [head] = layout.props.children; + const script = head.props.children; + expect(script.props).toMatchObject({ + src: "https://rybbit.sanhouse.kr/api/script.js", + "data-site-id": "dd7fd8c3ae1a", + defer: true, + }); + }); + it("publishes canonical and social metadata for the subdomain", () => { expect(metadata.metadataBase?.toString()).toBe("https://labfox.theorvane.tech/"); expect(metadata.alternates?.canonical).toBe("/"); diff --git a/apps/planguard/app/layout.tsx b/apps/planguard/app/layout.tsx index f494118..4960853 100644 --- a/apps/planguard/app/layout.tsx +++ b/apps/planguard/app/layout.tsx @@ -25,7 +25,9 @@ export const metadata: Metadata = { export default function RootLayout({ children }: Readonly<{ children: React.ReactNode }>) { return ( - {/* Analytics: add the Rybbit script here once a PlanGuard site id is provisioned. */} + + + {children} ); diff --git a/apps/planguard/test/seo.test.tsx b/apps/planguard/test/seo.test.tsx index fce7b5b..c02c099 100644 --- a/apps/planguard/test/seo.test.tsx +++ b/apps/planguard/test/seo.test.tsx @@ -2,13 +2,24 @@ import { createElement } from "react"; import { render, screen } from "@testing-library/react"; import { describe, expect, it } from "vitest"; -import { metadata } from "../app/layout"; +import RootLayout, { metadata } from "../app/layout"; import HomePage from "../app/page"; import { alt as ogAlt, contentType as ogContentType, size as ogSize } from "../app/opengraph-image"; import robots from "../app/robots"; import sitemap from "../app/sitemap"; describe("PlanGuard technical SEO", () => { + it("configures the approved Rybbit site script", () => { + const layout = RootLayout({ children: null }); + const [head] = layout.props.children; + const script = head.props.children; + expect(script.props).toMatchObject({ + src: "https://rybbit.sanhouse.kr/api/script.js", + "data-site-id": "0b0d4eec0814", + defer: true, + }); + }); + it("publishes canonical and social metadata for the subdomain", () => { expect(metadata.metadataBase?.toString()).toBe("https://planguard.theorvane.tech/"); expect(metadata.alternates?.canonical).toBe("/"); diff --git a/apps/proxmox/app/layout.tsx b/apps/proxmox/app/layout.tsx index 8ea01ce..8450a19 100644 --- a/apps/proxmox/app/layout.tsx +++ b/apps/proxmox/app/layout.tsx @@ -25,7 +25,9 @@ export const metadata: Metadata = { export default function RootLayout({ children }: Readonly<{ children: React.ReactNode }>) { return ( - {/* Analytics: add the Rybbit script here once a Proxmox MCP site id is provisioned. */} + + + {children} ); diff --git a/apps/proxmox/test/seo.test.tsx b/apps/proxmox/test/seo.test.tsx index 4503860..e414ce2 100644 --- a/apps/proxmox/test/seo.test.tsx +++ b/apps/proxmox/test/seo.test.tsx @@ -2,13 +2,24 @@ import { createElement } from "react"; import { render, screen } from "@testing-library/react"; import { describe, expect, it } from "vitest"; -import { metadata } from "../app/layout"; +import RootLayout, { metadata } from "../app/layout"; import HomePage from "../app/page"; import { alt as ogAlt, contentType as ogContentType, size as ogSize } from "../app/opengraph-image"; import robots from "../app/robots"; import sitemap from "../app/sitemap"; describe("Proxmox MCP technical SEO", () => { + it("configures the approved Rybbit site script", () => { + const layout = RootLayout({ children: null }); + const [head] = layout.props.children; + const script = head.props.children; + expect(script.props).toMatchObject({ + src: "https://rybbit.sanhouse.kr/api/script.js", + "data-site-id": "fa6c186963f9", + defer: true, + }); + }); + it("publishes canonical and social metadata for the subdomain", () => { expect(metadata.metadataBase?.toString()).toBe("https://proxmox.theorvane.tech/"); expect(metadata.alternates?.canonical).toBe("/");