feat: robots.txt
This commit is contained in:
parent
a2ea5f6aec
commit
afbffd4606
8 changed files with 32 additions and 8 deletions
|
|
@ -6,6 +6,10 @@ import UsernameForm from "@/components/username-form";
|
||||||
export const metadata: Metadata = {
|
export const metadata: Metadata = {
|
||||||
title: "Create your Username - TomodachiShare",
|
title: "Create your Username - TomodachiShare",
|
||||||
description: "Pick a unique username to start using TomodachiShare",
|
description: "Pick a unique username to start using TomodachiShare",
|
||||||
|
robots: {
|
||||||
|
index: false,
|
||||||
|
follow: false,
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
export default async function CreateUsernamePage() {
|
export default async function CreateUsernamePage() {
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,10 @@ export async function generateMetadata({ params }: Props): Promise<Metadata> {
|
||||||
return {
|
return {
|
||||||
title: `${mii?.name} - TomodachiShare`,
|
title: `${mii?.name} - TomodachiShare`,
|
||||||
description: `Edit the name, tags, and images of '${mii?.name}'`,
|
description: `Edit the name, tags, and images of '${mii?.name}'`,
|
||||||
|
robots: {
|
||||||
|
index: false,
|
||||||
|
follow: false,
|
||||||
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,10 @@ const lexend = Lexend({
|
||||||
export const metadata: Metadata = {
|
export const metadata: Metadata = {
|
||||||
title: "TomodachiShare",
|
title: "TomodachiShare",
|
||||||
description: "Discover and share Mii residents for your Tomodachi Life island!",
|
description: "Discover and share Mii residents for your Tomodachi Life island!",
|
||||||
|
robots: {
|
||||||
|
index: true,
|
||||||
|
follow: true,
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
export default function RootLayout({
|
export default function RootLayout({
|
||||||
|
|
|
||||||
|
|
@ -68,10 +68,6 @@ export async function generateMetadata({ params }: Props): Promise<Metadata> {
|
||||||
alternates: {
|
alternates: {
|
||||||
canonical: `/mii/${mii.id}`,
|
canonical: `/mii/${mii.id}`,
|
||||||
},
|
},
|
||||||
robots: {
|
|
||||||
index: true,
|
|
||||||
follow: true,
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -63,10 +63,6 @@ export async function generateMetadata({ params }: Props): Promise<Metadata> {
|
||||||
alternates: {
|
alternates: {
|
||||||
canonical: `/profile/${user.id}`,
|
canonical: `/profile/${user.id}`,
|
||||||
},
|
},
|
||||||
robots: {
|
|
||||||
index: true,
|
|
||||||
follow: true,
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,10 @@ import ProfileSettings from "@/components/profile-settings";
|
||||||
export const metadata: Metadata = {
|
export const metadata: Metadata = {
|
||||||
title: "Profile Settings - TomodachiShare",
|
title: "Profile Settings - TomodachiShare",
|
||||||
description: "Change your account info or delete it",
|
description: "Change your account info or delete it",
|
||||||
|
robots: {
|
||||||
|
index: false,
|
||||||
|
follow: false,
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
export default async function ProfileSettingsPage() {
|
export default async function ProfileSettingsPage() {
|
||||||
|
|
|
||||||
12
src/app/robots.ts
Normal file
12
src/app/robots.ts
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
import type { MetadataRoute } from "next";
|
||||||
|
|
||||||
|
export default function robots(): MetadataRoute.Robots {
|
||||||
|
return {
|
||||||
|
rules: {
|
||||||
|
userAgent: "*",
|
||||||
|
allow: "/",
|
||||||
|
disallow: ["/create-username", "/edit/*", "/profile/settings", "/random", "/submit"],
|
||||||
|
},
|
||||||
|
sitemap: `${process.env.BASE_URL}/sitemap.xml`,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -6,6 +6,10 @@ import SubmitForm from "@/components/submit-form";
|
||||||
export const metadata: Metadata = {
|
export const metadata: Metadata = {
|
||||||
title: "Submit a Mii - TomodachiShare",
|
title: "Submit a Mii - TomodachiShare",
|
||||||
description: "Upload your Tomodachi Life Mii through its QR code and share it with others",
|
description: "Upload your Tomodachi Life Mii through its QR code and share it with others",
|
||||||
|
robots: {
|
||||||
|
index: false,
|
||||||
|
follow: false,
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
export default async function SubmitPage() {
|
export default async function SubmitPage() {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue