Skip to content

Commit

Permalink
Change metadata to use template title
Browse files Browse the repository at this point in the history
  • Loading branch information
armans-code committed Oct 18, 2024
1 parent 30f38e5 commit 8fb9ddb
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/app/(category-sidebar)/products/[category]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ export async function generateMetadata({
.toLowerCase();

return {
title: `${category.name} | NextMaster`,
title: `${category.name}`,
openGraph: {
title: `${category.name} | NextMaster`,
title: `${category.name}`,
description: `Choose from our selection of ${category.name.toLowerCase()}, including ${examples + (category.subcollections.length > 1 ? "," : "")} and more. In stock and ready to ship.`,
},
};
Expand Down
5 changes: 4 additions & 1 deletion src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@ const futura = localFont({
});

export const metadata: Metadata = {
title: "NextMaster",
title: {
template: "%s | NextMaster",
default: "NextMaster",
},
description: "A performant site built with Next.js",
};

Expand Down
2 changes: 1 addition & 1 deletion src/app/order-history/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { LoginForm } from "@/components/login-form";
import { Metadata } from "next";

export const metadata: Metadata = {
title: "Order History | NextMaster",
title: "Order History",
};

export default function Page() {
Expand Down
2 changes: 1 addition & 1 deletion src/app/order/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import Link from "next/link";
import { Metadata } from "next";

export const metadata: Metadata = {
title: "Order | NextMaster",
title: "Order",
};

export default async function Page() {
Expand Down

0 comments on commit 8fb9ddb

Please sign in to comment.