Skip to content

Commit

Permalink
Merge pull request #1 from kmcginnes/og-image-url
Browse files Browse the repository at this point in the history
Add SITE_URL
  • Loading branch information
kmcginnes authored Jan 31, 2024
2 parents 89dfc21 + e627ebc commit c751b75
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import "~/styles/globals.css"
import { Bitter, Nunito_Sans } from "next/font/google"
import Footer from "./footer"
import { env } from "~/env"

const serif = Bitter({
subsets: ["latin"],
Expand All @@ -16,6 +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: env.SITE_URL && new URL(env.SITE_URL),
}

export default function RootLayout({
Expand Down
2 changes: 2 additions & 0 deletions src/env.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ export const env = createEnv({
*/
server: {
NODE_ENV: z.enum(["development", "test", "production"]),
SITE_URL: z.string().url().optional(),
},

/**
Expand All @@ -25,6 +26,7 @@ export const env = createEnv({
*/
runtimeEnv: {
NODE_ENV: process.env.NODE_ENV,
SITE_URL: process.env.SITE_URL,
// NEXT_PUBLIC_CLIENTVAR: process.env.NEXT_PUBLIC_CLIENTVAR,
},
/**
Expand Down

0 comments on commit c751b75

Please sign in to comment.