Skip to content

Commit bd6fd5c

Browse files
committed
feat: add metadata
1 parent 8d1eaee commit bd6fd5c

File tree

6 files changed

+71
-10
lines changed

6 files changed

+71
-10
lines changed

src/app/about/page.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
1-
'use client';
2-
31
import Navigation from '../components/Navigation';
42
import { FaLinkedin } from 'react-icons/fa';
3+
import type { Metadata } from 'next';
4+
5+
export const metadata: Metadata = {
6+
title: 'About 1:1 Meeting Cards | Our Mission',
7+
description: 'Learn about our mission to improve workplace relationships through meaningful 1:1 conversations. Discover how we help teams build stronger connections.'
8+
};
59

610
export default function About() {
711
return (

src/app/how-to/page.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
1-
'use client';
2-
31
import Navigation from '../components/Navigation';
2+
import type { Metadata } from 'next';
3+
4+
export const metadata: Metadata = {
5+
title: 'How to Use 1:1 Meeting Cards | Guide',
6+
description: 'Learn how to effectively use 1:1 Meeting Cards to lead better one-on-one conversations. Step-by-step guide to improve your team meetings.'
7+
};
48

59
export default function HowTo() {
610
return (

src/app/page.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
import DxHeroesLogo from './components/DxHeroesLogo';
22
import HomeCTA from './components/HomeCTA';
3+
import type { Metadata } from 'next';
4+
5+
export const metadata: Metadata = {
6+
title: '1:1 Meeting Cards | Lead Better One-on-One Conversations',
7+
description: 'Lead meaningful 1on1 conversations that strengthen your team and drive growth. A curated collection of conversation cards for better team management.'
8+
};
39

410
export default function Home() {
511
return (

src/app/topics/[id]/page.tsx

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,34 @@
1+
import { topics, type TopicId } from '../../constants/topics';
12
import DifficultyPage from './DifficultyPage';
2-
import { type TopicId, topics } from '../../constants/topics';
3+
import type { Metadata } from 'next';
34

4-
export const dynamic = 'force-static';
5+
type Props = {
6+
params: { id: TopicId }
7+
};
58

69
export function generateStaticParams() {
710
return Object.keys(topics).map((id) => ({
811
id,
912
}));
1013
}
1114

12-
export default async function Difficulty({ params }: { params: Promise<{ id: string }> }) {
13-
const { id } = await params;
14-
const topic = topics[id as TopicId];
15+
export async function generateMetadata({ params }: Props): Promise<Metadata> {
16+
const topic = topics[params.id];
1517

16-
return <DifficultyPage id={id} title={topic.title} description={topic.description} />;
18+
if (!topic) {
19+
return {
20+
title: 'Topic Not Found | 1:1 Meeting Cards',
21+
description: 'The requested topic could not be found.'
22+
};
23+
}
24+
25+
return {
26+
title: `${topic.title} | 1:1 Meeting Cards`,
27+
description: `Explore ${topic.title.toLowerCase()} questions for your 1:1 meetings. Choose from different difficulty levels to guide your conversations.`
28+
};
29+
}
30+
31+
export default function Topic({ params }: Props) {
32+
const topic = topics[params.id];
33+
return <DifficultyPage id={params.id} title={topic.title} description={topic.description} />;
1734
}

src/app/topics/[id]/questions/[difficulty]/page.tsx

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import QuestionsPage from './QuestionsPage';
22
import { topics, difficulties, difficultyNames } from '../../../../constants/topics';
33
import type { TopicId, Difficulty } from '../../../../constants/topics';
4+
import type { Metadata } from 'next';
45

56
export const dynamic = 'force-static';
67

@@ -13,6 +14,29 @@ export function generateStaticParams() {
1314
);
1415
}
1516

17+
type Props = {
18+
params: { id: TopicId; difficulty: string }
19+
};
20+
21+
export async function generateMetadata({ params }: Props): Promise<Metadata> {
22+
const topic = topics[params.id];
23+
const difficultyName = params.difficulty === 'easy' ? 'Surface Level' :
24+
params.difficulty === 'medium' ? 'Medium Depth' :
25+
'Deep Questions';
26+
27+
if (!topic) {
28+
return {
29+
title: 'Questions Not Found | 1:1 Meeting Cards',
30+
description: 'The requested questions could not be found.'
31+
};
32+
}
33+
34+
return {
35+
title: `${difficultyName} Questions - ${topic.title} | 1:1 Meeting Cards`,
36+
description: `${difficultyName} questions for ${topic.title.toLowerCase()} discussions in your 1:1 meetings. Guide meaningful conversations with carefully crafted questions.`
37+
};
38+
}
39+
1640
export default async function Questions({ params }: { params: Promise<{ id: string; difficulty: string }> }) {
1741
const { id, difficulty } = await params;
1842
const topic = topics[id as TopicId];

src/app/topics/page.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
import Navigation from '../components/Navigation';
22
import TopicsList from '../components/TopicsList';
3+
import type { Metadata } from 'next';
4+
5+
export const metadata: Metadata = {
6+
title: 'Choose Your Topic | 1:1 Meeting Cards',
7+
description: 'Explore our curated collection of conversation topics for 1:1 meetings. Find the perfect questions to lead meaningful discussions with your team.'
8+
};
39

410
export default function Topics() {
511
return (

0 commit comments

Comments
 (0)