Skip to content

Commit

Permalink
Fix baseUrl on website
Browse files Browse the repository at this point in the history
  • Loading branch information
haydenbleasel committed May 27, 2024
1 parent 3354f1c commit c61e808
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion website/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,22 @@ import { Changelog } from './components/changelog';
import type { Metadata } from 'next';
import type { FC } from 'react';

const projectUrl = process.env.VERCEL_PROJECT_PRODUCTION_URL;
const protocol = process.env.NODE_ENV === 'development' ? 'http' : 'https';

if (!projectUrl) {
throw new Error('Missing VERCEL_PROJECT_PRODUCTION_URL');
}

export const generateMetadata = async (): Promise<Metadata> => {
const repo = await getRepo();

return {
title: 'Ultracite | Hayden Bleasel',
description: repo.data.description,
metadataBase: new URL(process.env.VERCEL_PROJECT_PRODUCTION_URL ?? ''),
metadataBase: new URL(
`${protocol}://${process.env.VERCEL_PROJECT_PRODUCTION_URL}`
),
};
};

Expand Down

0 comments on commit c61e808

Please sign in to comment.