feat: render CMS SEO metadata and refresh published page caches

This commit is contained in:
2026-10-11 18:05:47 +08:00
parent a8e2863cc4
commit 870b9b4282
19 changed files with 310 additions and 35 deletions
+6 -1
View File
@@ -27,7 +27,12 @@ export async function fetchAPI<T>(
{ revalidate = 60, tags }: FetchOptions = {},
): Promise<T> {
const res = await fetch(`${API_BASE_URL}${path}`, {
next: { revalidate, tags },
next: {
revalidate,
tags: path.startsWith("/api/v2/pages/")
? [...new Set(["wagtail-pages", ...(tags ?? [])])]
: tags,
},
});
if (!res.ok) {