fix seo and first page and 404 page

This commit is contained in:
2026-02-19 22:57:49 +03:30
parent 7b73faf32d
commit 234315ce52
13 changed files with 176 additions and 29 deletions
+8 -1
View File
@@ -1,6 +1,10 @@
const WP_API_BASE = "https://wpa.feep.ir/wp-json/wp/v2";
const FETCH_TIMEOUT_MS = 15_000;
/** کش مقالات وردپرس: یک ساعت. با revalidateTag('blog-posts') از API می‌توان کش را پاک کرد. */
const CACHE_REVALIDATE_SECONDS = 3600;
const CACHE_TAG_BLOG = "blog-posts";
export interface WpMediaSize {
source_url: string;
width?: number;
@@ -86,7 +90,10 @@ async function fetchWithTimeout(
const res = await fetch(url, {
...options,
signal: controller.signal,
next: { revalidate: 0 },
next: {
revalidate: CACHE_REVALIDATE_SECONDS,
tags: [CACHE_TAG_BLOG],
},
});
clearTimeout(timeout);
return res;