mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-11 08:33:53 +00:00
docs: americanize spelling + fix typos (#21627)
This commit is contained in:
parent
794449f469
commit
961f0f58f2
@ -19,7 +19,7 @@ Nuxt uses conventions and an opinionated directory structure to automate repetit
|
||||
- **File-based routing:** define routes based on the structure of your [`pages/` directory](/docs/guide/directory-structure/pages). This can make it easier to organize your application and avoid the need for manual route configuration.
|
||||
- **Code splitting:** Nuxt automatically splits your code into smaller chunks, which can help reduce the initial load time of your application.
|
||||
- **Server-side rendering out of the box:** Nuxt comes with built-in SSR capabilities, so you don't have to set up a separate server yourself.
|
||||
- **Auto-imports:** write Vue composables and components in their respective directories and use them without having to import them with the benefits of tree-shaking and optimised JS bundles.
|
||||
- **Auto-imports:** write Vue composables and components in their respective directories and use them without having to import them with the benefits of tree-shaking and optimized JS bundles.
|
||||
- **Data-fetching utilities:** Nuxt provides composables to handle SSR-compatible data fetching as well as different strategies.
|
||||
- **Zero-config TypeScript support:** write type-safe code without having to learn TypeScript with our auto-generated types and `tsconfig.json`
|
||||
- **Configured build tools:** we use [Vite](https://vitejs.dev) by default to support hot module replacement (HMR) in development and bundling your code for production with best-practices baked-in.
|
||||
|
@ -76,7 +76,7 @@ By default, the workload gets distributed to the workers with the round robin st
|
||||
|
||||
There are two ways to deploy a Nuxt application to any static hosting services:
|
||||
|
||||
- Static site generation (SSG) with `ssr: true` pre-renders routes of your application at build time. (This is the default behaviour when running `nuxi generate`.) It will also generate `/200.html` and `/404.html` single-page app fallback pages, which can render dynamic routes or 404 errors on the client (though you may need to configure this on your static host).
|
||||
- Static site generation (SSG) with `ssr: true` pre-renders routes of your application at build time. (This is the default behavior when running `nuxi generate`.) It will also generate `/200.html` and `/404.html` single-page app fallback pages, which can render dynamic routes or 404 errors on the client (though you may need to configure this on your static host).
|
||||
- Alternatively, you can prerender your site with `ssr: false` (static single-page app). This will produce HTML pages with an empty `<div id="__nuxt"></div>` where your Vue app would normally be rendered. You will lose many of the benefits of prerendering your site, so it is suggested instead to use `<ClientOnly>` to wrap the portions of your site that cannot be server rendered (if any).
|
||||
|
||||
### Crawl-based Pre-rendering
|
||||
|
@ -129,7 +129,7 @@ Nuxt uses `unhead` under the hood, and you can refer to its full documentation [
|
||||
|
||||
### Modifying The Rendered Head With A Nitro Plugin
|
||||
|
||||
If you need more advanced control, you can intercept the renderered html with a hook and modify the head programatically.
|
||||
If you need more advanced control, you can intercept the rendered html with a hook and modify the head programmatically.
|
||||
|
||||
Create a plugin in `~/server/plugins/my-plugin.ts` like this:
|
||||
|
||||
|
@ -154,8 +154,8 @@ const color = useColor() // Same as useState('color')
|
||||
|
||||
Nuxt **used to rely** on the Vuex library to provide global state management. If you are migrating from Nuxt 2, please head to [the migration guide](/docs/migration/configuration#vuex).
|
||||
|
||||
Nuxt is not opiniated about state management, so feel free to choose the right solution for your needs. There are multiple integrations with the most popular state management libraries, including:
|
||||
Nuxt is not opinionated about state management, so feel free to choose the right solution for your needs. There are multiple integrations with the most popular state management libraries, including:
|
||||
|
||||
- [Pinia](/modules/pinia) - the official Vue recommendation
|
||||
- [Harlem](/modules/harlem) - immutable global state management
|
||||
- [XState](/modules/xstate) - state machine approach with tools for visualising and testing your state logic
|
||||
- [XState](/modules/xstate) - state machine approach with tools for visualizing and testing your state logic
|
||||
|
Loading…
Reference in New Issue
Block a user