Skip to content

Commit 6fc2498

Browse files
committed
fix: add extra song OG metadata
1 parent 6c59575 commit 6fc2498

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

web/src/app/(content)/song/[id]/page.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ export async function generateMetadata({
1414
params,
1515
}: SongPage): Promise<Metadata> {
1616
let song;
17+
const publicUrl = process.env.NEXT_PUBLIC_URL;
1718

1819
try {
1920
const response = await axios.get<SongViewDtoType>(`/song/${params.id}`);
@@ -27,7 +28,12 @@ export async function generateMetadata({
2728
return {
2829
title: song.title,
2930
description: song.description,
31+
authors: [{ name: song.uploader.username }],
3032
openGraph: {
33+
url: publicUrl + '/song/' + song.publicId,
34+
title: song.title,
35+
description: song.description,
36+
siteName: 'Note Block World',
3137
images: [song.thumbnailUrl],
3238
},
3339
twitter: {

0 commit comments

Comments
 (0)