REFACTORED - Flatten portfolio category routes to /portfolio/[slug]

Merge the category and project routes under a single /portfolio/[slug]
segment via resolvePortfolioSlug (category wins over project on a slug
clash). Removes the /portfolio/category/... prefix from links, redirect,
and sitemap. Adds resolver integration tests.
This commit is contained in:
moh
2026-09-20 18:53:48 +02:00
parent 5b019052b1
commit 3f96abc60f
9 changed files with 133 additions and 136 deletions
+1 -1
View File
@@ -50,7 +50,7 @@ export default async function PortfolioPage({
const selectedCategory = resolvedSearchParams?.category ?? "";
if (selectedCategory) {
redirect(getLocalizedPath(localeKey, `/portfolio/category/${selectedCategory}`, siteSettings.defaultLocale));
redirect(getLocalizedPath(localeKey, `/portfolio/${selectedCategory}`, siteSettings.defaultLocale));
}
const [categories, projects] = await Promise.all([