feat: render CMS SEO metadata and refresh published page caches
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user