fix(seo): self-canonical + unique description on 6 pages that deduped to home
CI/CD / CI · API (dotnet build + test) (push) Successful in 1m4s
CI/CD / CI · Admin API (dotnet build) (push) Successful in 30s
CI/CD / CI · Dashboard (tsc) (push) Successful in 1m9s
CI/CD / CI · Admin Web (tsc) (push) Successful in 38s
CI/CD / CI · Website (tsc) (push) Successful in 46s
CI/CD / CI · Koja (tsc) (push) Successful in 52s
CI/CD / Deploy · all services (push) Successful in 2m1s

contact / careers / status / privacy / terms / docs set no alternates, so they
inherited the layout's canonical (= the locale homepage) — Google treats them as
duplicates of the home page and drops them. Each now sets a self-referencing
canonical + full fa/en/x-default hreflang (new shared lib/seo.ts pageAlternates)
and a unique meta description (added *Desc keys, fa/en) + per-page OpenGraph.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
soroush.asadi
2026-06-24 21:32:08 +03:30
parent 8ea98bdc09
commit 166f2b2586
9 changed files with 74 additions and 8 deletions
+7 -1
View File
@@ -1,5 +1,6 @@
import type { Metadata } from "next";
import { getTranslations } from "next-intl/server";
import { SITE_URL, pageAlternates } from "@/lib/seo";
import { Navbar } from "@/components/layout/navbar";
import { Footer } from "@/components/layout/footer";
import { FileText } from "lucide-react";
@@ -11,7 +12,12 @@ export async function generateMetadata({
}): Promise<Metadata> {
const { locale } = await params;
const t = await getTranslations({ locale, namespace: "meta" });
return { title: t("termsTitle") };
return {
title: t("termsTitle"),
description: t("termsDesc"),
alternates: pageAlternates(locale, "/terms"),
openGraph: { title: t("termsTitle"), description: t("termsDesc"), url: `${SITE_URL}/${locale}/terms` },
};
}
const fa = {