File tree Expand file tree Collapse file tree
apps/web/app/(with-contexts)/(with-layout)/p/[id] Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ import { getAddressFromHeaders } from "@/ui-lib/utils";
33import ClientSidePage from "./client-side-page" ;
44import { headers } from "next/headers" ;
55import type { Metadata , ResolvingMetadata } from "next" ;
6+ import { Media } from "@courselit/common-models" ;
67
78type Props = {
89 params : {
@@ -26,9 +27,11 @@ export async function generateMetadata(
2627 }
2728
2829 const title = page . title || page . pageData ?. title || page . name ;
29- const socialImage = page . socialImage || siteInfo . settings . logo ;
30- const description =
31- page . description || ( page . pageData ?. description as string ) ;
30+ const socialImage : Media | undefined =
31+ page . socialImage ||
32+ ( page . pageData ?. featuredImage as Media ) ||
33+ siteInfo . settings . logo ;
34+ const description = page . description ;
3235
3336 return {
3437 generator : "CourseLit" ,
You can’t perform that action at this time.
0 commit comments