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) => {
247247 } ) ;
248248
249249 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
250253 post . site ?. customDomain &&
251- revalidateTag ( `${ post . site ?. customDomain } -posts` ) ;
254+ ( revalidateTag ( `${ post . site ?. customDomain } -posts` ) ,
255+ revalidateTag ( `${ post . site ?. customDomain } -${ post . slug } ` ) ) ;
252256
253257 return response ;
254258 } catch ( error : any ) {
@@ -300,9 +304,12 @@ export const updatePostMetadata = withPostAuth(
300304 }
301305
302306 revalidateTag ( `${ post . site ?. subdomain } -posts` ) ;
307+ revalidateTag ( `${ post . site ?. subdomain } -${ post . slug } ` ) ;
303308
309+ // if the site has a custom domain, we need to revalidate those tags too
304310 post . site ?. customDomain &&
305- revalidateTag ( `${ post . site ?. customDomain } -posts` ) ;
311+ ( revalidateTag ( `${ post . site ?. customDomain } -posts` ) ,
312+ revalidateTag ( `${ post . site ?. customDomain } -${ post . slug } ` ) ) ;
306313
307314 return response ;
308315 } catch ( error : any ) {
You can’t perform that action at this time.
0 commit comments