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
@@ -35,7 +35,7 @@ describe("PortfolioCategoryFilter", () => {
expect(screen.getByRole("link", { name: "All" })).toHaveAttribute("href", "/en/portfolio");
expect(screen.getByRole("link", { name: "Branding" })).toHaveAttribute(
"href",
"/en/portfolio/category/branding",
"/en/portfolio/branding",
);
});
@@ -51,7 +51,7 @@ describe("PortfolioCategoryFilter", () => {
// German locale on the default locale -> unprefixed paths and German labels
expect(screen.getByRole("link", { name: "Marke" })).toHaveAttribute(
"href",
"/portfolio/category/branding",
"/portfolio/branding",
);
expect(screen.getByRole("link", { name: "Alle" })).toHaveAttribute("href", "/portfolio");
});