Skip to content

Commit

Permalink
Merge pull request #33 from HereEast/fix/metadata
Browse files Browse the repository at this point in the history
fix: Fix metadata
  • Loading branch information
HereEast authored Feb 18, 2025
2 parents 0571caf + af24e9e commit 40bf3cf
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
8 changes: 5 additions & 3 deletions src/app/questions/[slug]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,12 @@ export async function generateMetadata({ params }: QuestionPageProps) {
slug: params.slug,
}).exec();

const title = SEO_DATA.question.title(question.body);
const description = SEO_DATA.question.description;
if (question) {
const title = SEO_DATA.question.title(question.body);
const description = SEO_DATA.question.description;

return getMetadata({ title, description });
return getMetadata({ title, description });
}
}

// PARAMS
Expand Down
4 changes: 2 additions & 2 deletions src/utils/getMetadata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ export function getMetadata(input: MetadataInput = {}): Metadata {
description,
metadataBase: new URL(SEO_DATA.index.url),
openGraph: {
title: SEO_DATA.index.title,
description: SEO_DATA.index.description,
title,
description,
url: SEO_DATA.index.url,
siteName: "people-work.net",
images: [
Expand Down

0 comments on commit 40bf3cf

Please sign in to comment.