From ddeab06b451929ee45cb70709f48982a46acf034 Mon Sep 17 00:00:00 2001 From: poyrazavsever Date: Mon, 31 Aug 2026 20:08:11 +0300 Subject: [PATCH] fix(seo): correct canonicals and navigation semantics --- app/[locale]/layout.tsx | 5 ++-- app/robots.ts | 3 +- app/rss.xml/route.ts | 2 +- components/json-ld.tsx | 2 +- components/layout-promo-rails.tsx | 15 ++++++---- components/site-navbar.tsx | 48 +++++++++++++++++-------------- lib/seo.ts | 18 ++++++++++-- 7 files changed, 57 insertions(+), 36 deletions(-) diff --git a/app/[locale]/layout.tsx b/app/[locale]/layout.tsx index f2349a7..8a6ce2c 100644 --- a/app/[locale]/layout.tsx +++ b/app/[locale]/layout.tsx @@ -10,6 +10,7 @@ import { GoogleAnalytics } from "@/components/google-analytics"; import { PoyrazBottomRightFollower } from "@/components/poyraz-bottom-right-follower"; import { listAnimationSources } from "@/data/animation-sources"; import { getHomeBlogNews, getLatestAgendaArticle } from "@/data/blog"; +import { SITE_URL } from "@/lib/seo"; export async function generateMetadata({ params, @@ -24,7 +25,7 @@ export async function generateMetadata({ const description = t("description"); return { - metadataBase: new URL("https://poyrazavsever.com"), + metadataBase: new URL(SITE_URL), title: { default: title, template: titleTemplate, @@ -34,7 +35,7 @@ export async function generateMetadata({ icons: { icon: [ { url: "/favicon.ico", sizes: "any" }, - { url: "/logo/logo.webp", type: "image/webp" }, + { url: "/logo/logo-96.webp", type: "image/webp", sizes: "96x96" }, ], shortcut: "/favicon.ico", apple: "/logo/apple-touch-icon.png", diff --git a/app/robots.ts b/app/robots.ts index 6825975..c406a1a 100644 --- a/app/robots.ts +++ b/app/robots.ts @@ -1,6 +1,5 @@ import type { MetadataRoute } from "next"; - -const SITE_URL = process.env.NEXT_PUBLIC_SITE_URL || "https://poyrazavsever.com"; +import { SITE_URL } from "@/lib/seo"; export default function robots(): MetadataRoute.Robots { return { diff --git a/app/rss.xml/route.ts b/app/rss.xml/route.ts index 3de436d..5418e4d 100644 --- a/app/rss.xml/route.ts +++ b/app/rss.xml/route.ts @@ -1,6 +1,6 @@ import { getAllBlogArticles } from "@/data/blog"; -const SITE_URL = process.env.NEXT_PUBLIC_SITE_URL || "https://poyrazavsever.com"; +import { SITE_URL } from "@/lib/seo"; const FEED_PATH = "/rss.xml"; const FEED_TITLE = "Poyraz Avsever Blog"; const FEED_DESCRIPTION = diff --git a/components/json-ld.tsx b/components/json-ld.tsx index a3757f0..fc0667a 100644 --- a/components/json-ld.tsx +++ b/components/json-ld.tsx @@ -1,4 +1,4 @@ -const SITE_URL = process.env.NEXT_PUBLIC_SITE_URL || "https://poyrazavsever.com"; +import { SITE_URL } from "@/lib/seo"; function serializeJsonLd(data: object) { return JSON.stringify(data).replace(/
setActiveSlide(index)} className="group flex size-5 items-center justify-center rounded-full outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2" @@ -266,12 +264,19 @@ function PromoRail({ })}
+ + {t("slideStatus", { + current: activeSlide + 1, + total: slides.length, + })} + +
void; @@ -125,7 +134,6 @@ export function SiteNavbar({ return pathname === href || pathname.startsWith(`${href}/`); }; - const activeTab = NAV_LINKS.find((item) => isActiveLink(item.href))?.id; const activeMobileMenuGroup = NAV_DROPDOWN_GROUPS.find( (group) => group.id === mobileMenuGroupId, ); @@ -204,7 +212,7 @@ export function SiteNavbar({ className="inline-flex shrink-0 items-center" >
- - +