-
Notifications
You must be signed in to change notification settings - Fork 3
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
seo : 사이트맵, 메타데이터 동적으로 생성 #51
Conversation
seondal
commented
Sep 9, 2023
•
edited by guesung
Loading
edited by guesung
- SEO 검색엔진 최적화 #50
export async function generateMetadata( | ||
{ params }: { params: { id: string } }, | ||
parent: ResolvingMetadata | ||
): Promise<Metadata> { | ||
const id = parseInt(params.id); | ||
const { | ||
poseInfo: { peopleCount, frameCount, tagAttributes }, | ||
} = await getPoseDetail(id); | ||
const description = `${tagAttributes},${frameCount}컷,${peopleCount}인 포즈추천`; | ||
const defaultOgTitle = (await parent).openGraph?.title; | ||
|
||
return { | ||
description, | ||
openGraph: { | ||
title: defaultOgTitle, | ||
description: '이 포즈는 어때요?', | ||
}, | ||
}; | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
오 ,, 이런 식으로 각 페이지에 맞게 metaData를 만들 수 있군요 .!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
검색 엔진에 저희 사이트가 많이 뜨면 좋겠네요 ㅎㅎ
#issue 번호 앞에 저는 issue가 닫히면 안되어서 close를 안붙혔었는데, 참고하시면 좋을 거 같아요 ! |