Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix crash when cloning locally #303

Merged
merged 1 commit into from
Apr 6, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ import { Header } from '@/components/header'
import { Toaster } from '@/components/ui/sonner'

export const metadata = {
metadataBase: new URL(`https://${process.env.VERCEL_URL}`),
metadataBase: process.env.VERCEL_URL
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm wondering if we can just remove this option altogether, as the default behavior seems to be exactly what we want.

https://nextjs.org/docs/app/api-reference/functions/generate-metadata#default-value

When VERCEL_URL is detected: https://${process.env.VERCEL_URL} otherwise it falls back to http://localhost:${process.env.PORT || 3000}.

? new URL(`https://${process.env.VERCEL_URL}`)
: undefined,
title: {
default: 'Next.js AI Chatbot',
template: `%s - Next.js AI Chatbot`
Expand Down