Overview - Static export option
What is it?
The static export option in Next.js lets you create a website where all pages are pre-built into simple HTML files. This means the site can be served without a server running code for each visitor. It is useful for sites that don't need to change content on the fly and want fast loading times.
Why it matters
Without static export, every page request might need server processing, which can slow down the site and increase hosting costs. Static export solves this by generating all pages ahead of time, making the site faster and easier to host anywhere, even on simple file servers or CDNs.
Where it fits
Before learning static export, you should understand basic Next.js pages and routing. After mastering static export, you can explore dynamic rendering methods like server-side rendering and incremental static regeneration for more complex needs.
// when images are not in public folder