Skip to content

Commit 3235c4b

Browse files
committed
fix: add missing metadata to all website pages
1 parent 6fc2498 commit 3235c4b

File tree

13 files changed

+52
-25
lines changed

13 files changed

+52
-25
lines changed

web/src/app/(content)/(info)/about/page.tsx

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,7 @@ import { NoteBlockWorldLogo } from '@web/src/modules/shared/components/NoteBlock
66
import About from './about.mdx';
77

88
export const metadata: Metadata = {
9-
title: {
10-
template: '%s | Help',
11-
default: 'Note Block World',
12-
},
13-
openGraph: {
14-
title: 'Create, share and listen to note block music',
15-
description: 'Note Block World',
16-
siteName: 'Note Block World',
17-
},
9+
title: 'About',
1810
};
1911

2012
const AboutPage = () => {

web/src/app/(content)/(info)/blog/page.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,11 @@ import Link from 'next/link';
55

66
import { getSortedPostsData } from '@web/src/lib/posts';
77
import type { PostType } from '@web/src/lib/posts';
8+
import { Metadata } from 'next';
89

10+
export const metadata: Metadata = {
11+
title: 'Blog',
12+
};
913
async function BlogPage() {
1014
const allPostsData = getSortedPostsData('blog', 'date');
1115
return <BlogPageComponent posts={allPostsData}></BlogPageComponent>;

web/src/app/(content)/(info)/contact/page.tsx

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,7 @@ import BackButton from '@web/src/modules/shared/components/client/BackButton';
55
import Contact from './contact.mdx';
66

77
export const metadata: Metadata = {
8-
title: {
9-
template: '%s | Help',
10-
default: 'Note Block World',
11-
},
12-
openGraph: {
13-
title: 'Create, share and listen to note block music',
14-
description: 'Note Block World',
15-
siteName: 'Note Block World',
16-
},
8+
title: 'Contact',
179
};
1810

1911
const AboutPage = () => {

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

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,11 @@ export function generateMetadata({ params }: HelpPageProps): Metadata {
1818
const publicUrl = process.env.NEXT_PUBLIC_URL;
1919

2020
return {
21-
title: {
22-
template: '%s | Help',
23-
default: 'Note Block World',
24-
},
21+
title: post.title,
2522
authors: [{ name: post.author }],
2623
openGraph: {
2724
url: publicUrl + '/help/' + id,
2825
title: post.title,
29-
description: 'Create, share and listen to note block music',
3026
siteName: 'Note Block World',
3127
images: [
3228
{

web/src/app/(content)/(info)/help/page.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ import Link from 'next/link';
55

66
import { getSortedPostsData } from '@web/src/lib/posts';
77
import type { PostType } from '@web/src/lib/posts';
8+
import { Metadata } from 'next';
9+
10+
export const metadata: Metadata = {
11+
title: 'Help Center',
12+
};
813

914
async function HelpPage() {
1015
const allPostsData = getSortedPostsData('help', 'id');

web/src/app/(content)/my-songs/page.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@ import { redirect } from 'next/navigation';
22

33
import { checkLogin } from '@web/src/modules/auth/features/auth.utils';
44
import Page from '@web/src/modules/my-songs/components/MySongsPage';
5+
import { Metadata } from 'next';
6+
7+
export const metadata: Metadata = {
8+
title: 'My songs',
9+
};
510

611
const MySongsPage = async () => {
712
// TODO: Next.js extends fetch() to memoize the result of multiple requests to the same URL.

web/src/app/(content)/page.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import {
22
FeaturedSongsDtoType,
33
SongPreviewDtoType,
44
} from '@shared/validation/song/dto/types';
5+
import { Metadata } from 'next';
56

67
import axiosInstance from '@web/src/lib/axios';
78
import { HomePageProvider } from '@web/src/modules/browse/components/client/context/HomePage.context';
@@ -46,6 +47,10 @@ async function fetchFeaturedSongs(): Promise<FeaturedSongsDtoType> {
4647
}
4748
}
4849

50+
export const metadata: Metadata = {
51+
title: 'Songs',
52+
};
53+
4954
async function Home() {
5055
const recentSongs = await fetchRecentSongs();
5156
const featuredSongs = await fetchFeaturedSongs();

web/src/app/(content)/upload/page.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ import {
55
getUserData,
66
} from '@web/src/modules/auth/features/auth.utils';
77
import { UploadSongPage } from '@web/src/modules/song-upload/components/client/UploadSongPage';
8+
import { Metadata } from 'next';
9+
10+
export const metadata: Metadata = {
11+
title: 'Upload song',
12+
};
813

914
async function UploadPage() {
1015
const isLogged = await checkLogin();

web/src/app/(external)/(auth)/login/page.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@ import { redirect } from 'next/navigation';
22

33
import { LoginPage } from '@web/src/modules/auth/components/loginPage';
44
import { checkLogin } from '@web/src/modules/auth/features/auth.utils';
5+
import { Metadata } from 'next';
6+
7+
export const metadata: Metadata = {
8+
title: 'Sign in',
9+
};
510

611
const Login = async () => {
712
const isLogged = await checkLogin();

web/src/app/(external)/(legal)/privacy/page.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,11 @@ import fs from 'fs';
22
import path from 'path';
33

44
import { CustomMarkdown } from '@web/src/modules/shared/components/CustomMarkdown';
5+
import { Metadata } from 'next';
56

7+
export const metadata: Metadata = {
8+
title: 'Privacy Policy',
9+
};
610
async function PrivacyPolicyPage() {
711
const fullPath = path.join('./public/docs/privacy.md');
812
const fileContents = fs.readFileSync(fullPath, 'utf8');

0 commit comments

Comments
 (0)