Search code examples
next.jsdigital-oceanstatic-site-generation

Does Incremental Static Regeneration count as Static Site Generation in Digital Ocean?


I plan to host a Next.js website on Digital Ocean's App Platform and have recently found out that hosting a static site on Digital Ocean is free (up to three websites). Would this also apply to websites that use incremental static generation?


Solution

  • Unfortunately, no. Incremental Static Regeneration implies that you run a Next.js server (which is based on Node js) which knows when to regenerate (recreate) your pages. Without the server it's impossible to create new files or update old ones.

    And hosting just a static site usually implies that you only provide static files, without the need to run the server. In Next.js terms it's next export command which will generate static files, but those won't be regenerated unless you run a server.

    If your site does not change frequently maybe you can just rebuild it every couple of days manually or write some script to do it.