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