Skip to content

Commit a28661d

Browse files
authored
Merge pull request #478 from s2sharpit/dynamic-title
adding title to every page
2 parents 0ab1c21 + 583acf6 commit a28661d

File tree

4 files changed

+23
-16
lines changed

4 files changed

+23
-16
lines changed

src/app/blogs/page.tsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
1-
import Head from "next/head";
21
import Image from "next/image";
32
// import { Blogs } from '../components/Global'
3+
import { Metadata } from "next";
4+
5+
export const metadata: Metadata = {
6+
title: "Blog",
7+
};
48

59

610
async function getData() {
@@ -30,9 +34,6 @@ export default async function BlogPage({
3034

3135
return (
3236
<>
33-
<Head>
34-
<title>Blog | WebXDAO</title>
35-
</Head>
3637
<section className="py-8">
3738
<div className="container mx-auto max-w-5xl">
3839
<h1 className="my-2 w-full text-center text-4xl font-bold leading-tight text-white">

src/app/contributors/page.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
import ContributorCard from "@/components/ContributorCard";
2+
import { Metadata } from "next";
23

4+
export const metadata: Metadata = {
5+
title: "Contributors",
6+
};
37

48
async function getContributorData() {
59
// fetch contributors using Github REST API

src/app/projects/page.tsx

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
1-
import Star from "../../components/star";
1+
import Star from "@/components/star";
22
import { fontGilroy } from "@/lib/fonts";
33
import { cn } from "@/lib/utils";
4-
import Head from "next/head";
5-
import ProjectCard from "../../components/ProjectCard";
4+
import ProjectCard from "@/components/ProjectCard";
5+
import { Metadata } from 'next';
6+
7+
export const metadata: Metadata = {
8+
title: 'Projects',
9+
}
610

711
async function getRepoData() {
812
const res = await fetch("https://api.github.com/orgs/WebXDAO/repos");
@@ -16,12 +20,9 @@ async function getRepoData() {
1620

1721
export default async function Projects() {
1822
const projectsData = await getRepoData();
19-
console.log(projectsData);
23+
// console.log(projectsData);
2024
return (
2125
<>
22-
<Head>
23-
<title>Projects | WebXDAO</title>
24-
</Head>
2526
<section className="w-full overflow-hidden py-8">
2627
<div className="container mx-auto flex max-w-5xl flex-row flex-wrap justify-around lg:flex-nowrap">
2728
<h1

src/app/team/page.tsx

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
1-
import Star from "../../components/star";
1+
import Star from "@/components/star";
22
import { fontGilroy } from "@/lib/fonts";
33
import { cn } from "@/lib/utils";
4-
import Head from "next/head";
54
import TeamCard from "@/components/TeamCard";
5+
import { Metadata } from 'next';
6+
7+
export const metadata: Metadata = {
8+
title: 'Team',
9+
}
610

711
export default async function Team() {
812
return (
913
<>
10-
<Head>
11-
<title>Team | WebXDAO</title>
12-
</Head>
1314
<section className="w-full overflow-hidden py-8">
1415
<div className="container mx-auto flex max-w-5xl flex-row flex-wrap justify-around lg:flex-nowrap ">
1516
<h1

0 commit comments

Comments
 (0)