File tree Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -3,12 +3,15 @@ import type { Metadata } from "next"
33import HomePage from "@/app-pages/HomePage/HomePage"
44import { getMetadataAsync } from "@/common/metadata"
55
6+ const { NEXT_PUBLIC_ORIGIN } = process . env
7+
68export async function generateMetadata ( {
79 searchParams,
810} : {
911 searchParams : { [ key : string ] : string | string [ ] | undefined }
1012} ) : Promise < Metadata > {
1113 return await getMetadataAsync ( {
14+ metadataBase : NEXT_PUBLIC_ORIGIN ? new URL ( NEXT_PUBLIC_ORIGIN ) : null ,
1215 title : "Learn with MIT" ,
1316 searchParams,
1417 } )
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ import { RESOURCE_DRAWER_QUERY_PARAM } from "@/common/urls"
22import { learningResourcesApi } from "api/clients"
33import type { Metadata } from "next"
44
5- const DEFAULT_OG_IMAGE = ` ${ process . env . NEXT_PUBLIC_ORIGIN } /images/learn-og-image.jpg`
5+ const DEFAULT_OG_IMAGE = " /images/learn-og-image.jpg"
66
77type MetadataAsyncProps = {
88 title ?: string
You can’t perform that action at this time.
0 commit comments