Skip to content
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

Merged
merged 5 commits into from
Sep 11, 2023
Merged

Conversation

seondal
Copy link
Member

@seondal seondal commented Sep 9, 2023

@seondal seondal added the 🌐 SEO 검색엔진 최적화 작업 label Sep 9, 2023
@seondal seondal added this to the 1st Deploy 🌟 milestone Sep 9, 2023
@seondal seondal self-assigned this Sep 9, 2023
Comment on lines +7 to +26
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: '이 포즈는 어때요?',
},
};
}

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

오 ,, 이런 식으로 각 페이지에 맞게 metaData를 만들 수 있군요 .!

Copy link
Collaborator

@guesung guesung left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

검색 엔진에 저희 사이트가 많이 뜨면 좋겠네요 ㅎㅎ

@guesung
Copy link
Collaborator

guesung commented Sep 10, 2023

#issue 번호 앞에 close를 붙여서 PR을 생성하면, PR이 머지 되면 issue가 함께 자동으로 닫힙니다.

저는 issue가 닫히면 안되어서 close를 안붙혔었는데, 참고하시면 좋을 거 같아요 !

@seondal seondal merged commit db7bc39 into develop Sep 11, 2023
2 checks passed
@seondal seondal deleted the seo branch September 11, 2023 15:16
@seondal seondal restored the seo branch September 12, 2023 06:19
@seondal seondal deleted the seo branch September 12, 2023 06:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🌐 SEO 검색엔진 최적화 작업
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants