mirror of
https://github.com/TheRealOwenRees/echecsfrance.git
synced 2026-07-22 20:16:57 +00:00
add canonical url for locales
This commit is contained in:
@@ -54,6 +54,7 @@ const ContactForm = () => {
|
||||
name="email"
|
||||
control={form.control}
|
||||
label={t("emailLabel")}
|
||||
aria-label={t("emailLabel")}
|
||||
placeholder={t("emailPlaceholder")}
|
||||
required
|
||||
/>
|
||||
@@ -62,6 +63,7 @@ const ContactForm = () => {
|
||||
name="subject"
|
||||
control={form.control}
|
||||
label={t("subjectLabel")}
|
||||
aria-label={t("subjectLabel")}
|
||||
placeholder={t("subjectPlaceholder")}
|
||||
required
|
||||
/>
|
||||
@@ -71,6 +73,7 @@ const ContactForm = () => {
|
||||
control={form.control}
|
||||
rows={6}
|
||||
label={t("messageLabel")}
|
||||
aria-label={t("messageLabel")}
|
||||
placeholder={t("messagePlaceholder")}
|
||||
required
|
||||
/>
|
||||
|
||||
@@ -6,11 +6,11 @@ import { Inter, Julius_Sans_One } from "next/font/google";
|
||||
import { notFound } from "next/navigation";
|
||||
|
||||
import { LocaleChecker } from "@/components/LocaleChecker";
|
||||
import { MatomoAnalytics } from "@/components/MatomoAnalytics";
|
||||
import "@/css/globals.css";
|
||||
import Providers from "@/providers";
|
||||
|
||||
import Footer from "./(main)/components/Footer";
|
||||
import { MatomoAnalytics } from "@/components/MatomoAnalytics";
|
||||
|
||||
const inter = Inter({ subsets: ["latin"], variable: "--font-inter" });
|
||||
const title = Julius_Sans_One({
|
||||
@@ -31,10 +31,20 @@ export async function generateMetadata({
|
||||
namespace: "Metadata",
|
||||
});
|
||||
|
||||
const baseUrl = "https://echecsfrance.com";
|
||||
const canonicalPath = locale === "fr" ? "" : `/${locale}`;
|
||||
|
||||
return {
|
||||
title: t("title"),
|
||||
description: t("description"),
|
||||
keywords: t("keywords"),
|
||||
alternates: {
|
||||
canonical: `${baseUrl}${canonicalPath}`,
|
||||
languages: {
|
||||
fr: baseUrl,
|
||||
en: `${baseUrl}/en`,
|
||||
},
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user