| 1 | import type { Metadata } from 'next' |
| 2 | import { env } |
| 3 | import { APP_DEFAULT_TITLE } |
| 4 | |
| 5 | export function createMetadata(override |
| 6 | return { |
| 7 | ...override, |
| 8 | icons: { |
| 9 | icon: '/wordmark/logo_for_mark.png', |
| 10 | shortcut: '/wordmark/logo_for_mark.png', |
| 11 | apple: '/wordmark/logo_for_mark.png', |
| 12 | }, |
| 13 | openGraph: { |
| 14 | title: override.title |
| 15 | description: override.description |
| 16 | url: baseUrl.toString |
| 17 | images: '/opengraph-image.png', |
| 18 | siteName: APP_DEFAULT_TITLE, |
| 19 | ...override.openGraph, |
| 20 | }, |
| 21 | twitter: { |
| 22 | card: 'summary_large_image', |
| 23 | creator: '@gurpalsingh287', |
| 24 | title: override.title |
| 25 | description: override.description |
| 26 | images: '/twitter-image.png', |
| 27 | ...override.twitter, |
| 28 | }, |
| 29 | } |
| 30 | } |
| 31 | |
| 32 | export const baseUrl = |
| 33 | env.NODE_ENV === |
| 34 | ? new URL( |
| 35 | : new URL( |