diff --git a/src/app/layout.tsx b/src/app/layout.tsx index 3ad5f17..68cf2de 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -17,7 +17,7 @@ export const metadata = { title: "Kris McGinnes Portfolio", description: "I most enjoy building software at the intersection of design and engineering - things that look good but are also built well under the hood.", - metadataBase: new URL(env.SITE_URL), + metadataBase: env.SITE_URL && new URL(env.SITE_URL), } export default function RootLayout({ diff --git a/src/env.js b/src/env.js index c85edd5..2f3409c 100644 --- a/src/env.js +++ b/src/env.js @@ -8,7 +8,7 @@ export const env = createEnv({ */ server: { NODE_ENV: z.enum(["development", "test", "production"]), - SITE_URL: z.string().url(), + SITE_URL: z.string().url().optional(), }, /**