网页
综合
更新时间 2026-11-14 01:32:13
Static Site Generation · Nuxt Concepts v2
自动蜘蛛
nuxt.com
正文约 1886 字
When deploying your site in with target:static all your .vue pages will be generated into HTML and JavaScript files. All calls to APIs will be made and cached in a folder called static inside your generated content so that no calls to your API need to be made on client side navigation.
When a browser sends the initial request, it will hit the CDN.
The CDN will send the already generated HTML, JavaScript and static assets back to the browser. The content is displayed and the Vue.js hydration kicks in, making it reactive. After this process, the page is interactive.
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.
Server Side Rendering
Server-side rendering (SSR), is the ability of an application to contribute by displaying the web-page on the server instead of rendering it in the browser.
No matter which tool you use, you will always feel more confident when you understand how the tool works under the hood. The same applies to Nuxt.
Stay updated on new releases and features, guides, and community updates.
Copyright © 2016-2026 Nuxt - MIT License
本页为82搜索生成的网页快照,内容来自站内索引;演示数据的原文链接仅作示例。