#On-demand Revalidation for entire path

13 messages · Page 1 of 1 (latest)

inland wraith
#

Is there an option to revalidate an entire path instead of just individuell pages? So instead of revalidating just /blog/post-1 it would revalidate everything under /blog

craggy remnant
#

From what I’ve seen it needs to be a single path

stoic shard
#

I am also looking for a solution to the same problem.

My scenario is that I have a blog site and when the name of the site changes, I need to change the name of the site on all pages.

I am not finding a suitable way to do this.

@inland wraith Have you solved this problem?

pseudo needle
#

There's actually a lot of people that want this I believe, including me. I don't think there's a way to do this atm in nextjs sadly

vagrant swan
#

If you don’t know the paths ie in the case you have fallback:"blocking" and paths:[] (which somebody really shouldn’t do anyways) then you are out of luck

stoic shard
vagrant swan
#

Assuming you have a proper getStaticPaths

stoic shard
# vagrant swan But you know the paths right?

Actually, I do use paths: [], because I am developing a multi-user blog platform. The platforms template used

https://github.com/vercel/platforms

Although I can query the database to know the path list, its probably thousands of entries. I think that thousands of loops may have speed problems.

GitHub

A template for site builders and low-code tools. Contribute to vercel/platforms development by creating an account on GitHub.

vagrant swan
#

And also regeneration is asynchronous anyways

stoic shard
#

This is my current code