feat: integrate SEO system into pages
- Add OrganizationSchema to root layout - Add ProductSchema with metadata to product pages - Add enhanced metadata to homepage with keywords - Add enhanced metadata to products listing page - Add noindex to checkout page via layout - Implement canonical URLs, OpenGraph, and Twitter cards
This commit is contained in:
26
src/app/[locale]/checkout/layout.tsx
Normal file
26
src/app/[locale]/checkout/layout.tsx
Normal file
@@ -0,0 +1,26 @@
|
||||
import type { Metadata } from "next";
|
||||
import { getPageKeywords } from "@/lib/seo/keywords";
|
||||
import { isValidLocale, DEFAULT_LOCALE } from "@/lib/i18n/locales";
|
||||
|
||||
export async function generateMetadata({ params }: { params: Promise<{ locale: string }> }): Promise<Metadata> {
|
||||
const { locale } = await params;
|
||||
const validLocale = isValidLocale(locale) ? locale : DEFAULT_LOCALE;
|
||||
const keywords = getPageKeywords(validLocale, 'checkout');
|
||||
|
||||
return {
|
||||
title: keywords.metaTitle,
|
||||
description: keywords.metaDescription,
|
||||
robots: {
|
||||
index: false,
|
||||
follow: false,
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
export default function CheckoutLayout({
|
||||
children,
|
||||
}: {
|
||||
children: React.ReactNode;
|
||||
}) {
|
||||
return children;
|
||||
}
|
||||
Reference in New Issue
Block a user