NextJs revalidate navigation, footer ect

How are people handling page layout parts such as navigation and footer with NextJs and Incrimental static regeneration?

I´ve managed to get revalidate working when updating að document in Prismic and that is great, it rebuilds that specific page. But what if I update my navigation in Prismic, do I have to rebuild the whole site?

All thoughts are appreciated

Bippi

Hi @bippi,

Thank you for reaching out to us.

You have two ways of handling it:

  1. Create two different custom type(singleton) pages in Prismic for Header and footer and add documents of Header and footer as a content relationship in your pages (for ex: xyz) in Prismic. And when you send the request for the document (xyz) on the front end, please use the query to get the content from the content relationship pages. That way, all the page content will come from a single source.
  2. Just a slight modification in the above point, instead of adding Header and footer as content relationship, send two different requests from the front end to extract the data from Header and footer.

Let me know if you have any questions.

Thanks,
Priyanka