File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -247,8 +247,12 @@ export const updatePost = async (data: Post) => {
247
247
} ) ;
248
248
249
249
revalidateTag ( `${ post . site ?. subdomain } -posts` ) ;
250
+ revalidateTag ( `${ post . site ?. subdomain } -${ post . slug } ` ) ;
251
+
252
+ // if the site has a custom domain, we need to revalidate those tags too
250
253
post . site ?. customDomain &&
251
- revalidateTag ( `${ post . site ?. customDomain } -posts` ) ;
254
+ ( revalidateTag ( `${ post . site ?. customDomain } -posts` ) ,
255
+ revalidateTag ( `${ post . site ?. customDomain } -${ post . slug } ` ) ) ;
252
256
253
257
return response ;
254
258
} catch ( error : any ) {
@@ -300,9 +304,12 @@ export const updatePostMetadata = withPostAuth(
300
304
}
301
305
302
306
revalidateTag ( `${ post . site ?. subdomain } -posts` ) ;
307
+ revalidateTag ( `${ post . site ?. subdomain } -${ post . slug } ` ) ;
303
308
309
+ // if the site has a custom domain, we need to revalidate those tags too
304
310
post . site ?. customDomain &&
305
- revalidateTag ( `${ post . site ?. customDomain } -posts` ) ;
311
+ ( revalidateTag ( `${ post . site ?. customDomain } -posts` ) ,
312
+ revalidateTag ( `${ post . site ?. customDomain } -${ post . slug } ` ) ) ;
306
313
307
314
return response ;
308
315
} catch ( error : any ) {
You can’t perform that action at this time.
0 commit comments