diff --git a/app/context/layout.tsx b/app/context/layout.tsx index 8caed20a1..540b9f344 100644 --- a/app/context/layout.tsx +++ b/app/context/layout.tsx @@ -5,9 +5,12 @@ import { CounterProvider } from 'app/context/counter-context'; import React from 'react'; import ContextClickCounter from './context-click-counter'; +export const runtime = 'edge'; + const title = 'Client Context'; export const metadata = { + metadataBase: new URL('https://app-playground-on.pages.dev'), title, openGraph: { title, diff --git a/app/error-handling/layout.tsx b/app/error-handling/layout.tsx index 506e7d4ba..fad3609e9 100644 --- a/app/error-handling/layout.tsx +++ b/app/error-handling/layout.tsx @@ -3,9 +3,12 @@ import { ClickCounter } from '#/ui/click-counter'; import { TabGroup } from '#/ui/tab-group'; import React from 'react'; +export const runtime = 'edge'; + const title = 'Error Handling'; export const metadata = { + metadataBase: new URL('https://app-playground-on.pages.dev'), title, openGraph: { title, diff --git a/app/hooks/layout.tsx b/app/hooks/layout.tsx index ac30b428c..b9981b8cb 100644 --- a/app/hooks/layout.tsx +++ b/app/hooks/layout.tsx @@ -4,9 +4,12 @@ import { ClickCounter } from '#/ui/click-counter'; import { TabGroup } from '#/ui/tab-group'; import React from 'react'; +export const runtime = 'edge'; + const title = 'Hooks'; export const metadata = { + metadataBase: new URL('https://app-playground-on.pages.dev'), title, openGraph: { title, diff --git a/app/isr/layout.tsx b/app/isr/layout.tsx index 7cf3e34bd..d7f94b0ca 100644 --- a/app/isr/layout.tsx +++ b/app/isr/layout.tsx @@ -1,9 +1,12 @@ import { TabGroup } from '#/ui/tab-group'; import React from 'react'; +export const runtime = 'edge'; + const title = 'Incremental Static Regeneration (ISR)'; export const metadata = { + metadataBase: new URL('https://app-playground-on.pages.dev'), title, openGraph: { title, diff --git a/app/layout.tsx b/app/layout.tsx index 29eef16b3..6b874f70a 100644 --- a/app/layout.tsx +++ b/app/layout.tsx @@ -4,18 +4,21 @@ import Byline from '#/ui/byline'; import { GlobalNav } from '#/ui/global-nav'; import { Metadata } from 'next'; +export const runtime = 'edge'; + export const metadata: Metadata = { + metadataBase: new URL('https://app-playground-on.pages.dev'), title: { - default: 'Next.js App Router', - template: '%s | Next.js App Router', + default: 'Next.js App Router on Cloudflare Pages', + template: '%s | Next.js App Router on Cloudflare Pages', }, description: 'A playground to explore new Next.js App Router features such as nested layouts, instant loading states, streaming, and component level data fetching.', openGraph: { - title: 'Next.js App Router Playground', + title: 'Next.js App Router Playground on Cloudflare Pages', description: 'A playground to explore new Next.js App Router features such as nested layouts, instant loading states, streaming, and component level data fetching.', - images: [`/api/og?title=Next.js App Router`], + images: [`/api/og?title=Next.js App Router on Cloudflare Pages`], }, twitter: { card: 'summary_large_image', @@ -29,6 +32,15 @@ export default function RootLayout({ }) { return ( + {process.env.NODE_ENV === 'production' ? ( + +