Skip to content

Commit

Permalink
fix: metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
RUNFUNRUN committed Dec 12, 2024
1 parent 6be9b41 commit 912cedc
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 1 deletion.
12 changes: 12 additions & 0 deletions src/app/(home)/contact/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import {
import { Input } from '@/components/ui/input';
import { Label } from '@/components/ui/label';
import { Textarea } from '@/components/ui/textarea';
import type { Metadata } from 'next';
import Link from 'next/link';
import { useRouter } from 'next/navigation';
import { toast } from 'sonner';
Expand Down Expand Up @@ -75,3 +76,14 @@ const Page = () => {
};

export default Page;

export const generateMetadata = () => {
return {
openGraph: {
url: '/contact',
},
alternates: {
canonical: '/contact',
},
} satisfies Metadata;
};
16 changes: 16 additions & 0 deletions src/app/(home)/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import {
AccordionItem,
AccordionTrigger,
} from '@/components/ui/accordion';
import type { Metadata } from 'next';
import Link from 'next/link';

const Home = () => {
Expand Down Expand Up @@ -48,3 +49,18 @@ const Home = () => {
};

export default Home;

export const generateMetadata = () => {
return {
title: 'Contact RUNFUNRUN',
openGraph: {
url: '/contact',
},
robots: {
index: false,
googleBot: {
index: false,
},
},
} satisfies Metadata;
};
1 change: 0 additions & 1 deletion src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ export const metadata: Metadata = {
openGraph: {
title,
description,
url: '/',
},
twitter: {
title,
Expand Down

0 comments on commit 912cedc

Please sign in to comment.