Static Site Generation
With static site generation you can render your application during the build phase and deploy it to any static hosting services such as Netlify, GitHub pages, Vercel etc. This means that no server is needed in order to deploy your application.
When deploying your site in with
target:static all your
When a browser sends the initial request, it will hit the CDN.
Navigating between pages with
<NuxtLink> is done on the client side so you don't hit the CDN again and all API calls will be loaded from the already cached static folder even if you hard refresh the browser.
Pages that have been excluded from generation, by using the
generate.exclude property will fallback to being a single page application. These pages will therefore not exist in the CDN and will be rendered on client side in the browser once the user navigates to that page.
In order to get new content to your site from your API you will need to regenerate your site again. With most static sites hosting providers you can do this by pushing your changes to your main branch via the git command or via a pull request.
The Preview mode will call your API or your CMS so you can see the changes live before deploying. See the preview mode on how to enable this feature.