Redesign core pages and connect dynamic content

This commit is contained in:
amirhosein.ashourloo
2026-10-08 18:42:19 +03:30
parent 55d0fad2c8
commit 1d320b8f10
88 changed files with 1200 additions and 959 deletions
+5 -4
View File
@@ -4,7 +4,7 @@ import { NextRequest, NextResponse } from "next/server";
type RevalidateBody = {
/** Revalidate a fetch cache tag (portfolios, blogs, portfolio:slug, blog:slug, …). */
tag?: string;
/** Revalidate a path (/portfolios/foo, /, …). */
/** Revalidate a path (/projects/foo, /, …). */
path?: string;
/** Shorthand: portfolios | blogs | all */
scope?: "portfolios" | "blogs" | "all";
@@ -15,7 +15,7 @@ type RevalidateBody = {
*
* POST /api/revalidate
* Header: x-revalidate-secret: <REVALIDATE_SECRET>
* Body (JSON, optional): { "scope": "all" } | { "tag": "portfolios" } | { "path": "/portfolios/item" }
* Body (JSON, optional): { "scope": "all" } | { "tag": "portfolios" } | { "path": "/projects/item" }
*
* nginx may still serve cached HTML for up to its TTL (5m) unless purged separately.
*/
@@ -50,9 +50,10 @@ export async function POST(req: NextRequest) {
} else if (scope === "portfolios" || scope === "all") {
revalidateTag("portfolios");
revalidatePath("/");
revalidatePath("/portfolios");
revalidatePath("/projects");
revalidatePath("/aboutus");
revalidatePath("/our-services");
revalidatePath("/atelier");
revalidatePath("/raoofi-home");
revalidated.push("scope:portfolios");
}