]> git.ipfire.org Git - thirdparty/vuejs/pinia.git/commitdiff
docs: Change from 'Nuxt.js' to 'Nuxt' (#2924)
authorNaoki Haba <59875779+NaokiHaba@users.noreply.github.com>
Fri, 28 Feb 2025 07:28:37 +0000 (16:28 +0900)
committerGitHub <noreply@github.com>
Fri, 28 Feb 2025 07:28:37 +0000 (08:28 +0100)
* docs: update Nuxt.js references to Nuxt

* docs: update references from Nuxt.js to Nuxt

* docs: update references from Nuxt.js to Nuxt in English and Chinese configurations

* docs: update references from Nuxt.js to Nuxt in Chinese documentation

packages/docs/.vitepress/config/en.ts
packages/docs/.vitepress/config/zh.ts
packages/docs/ssr/index.md
packages/docs/ssr/nuxt.md
packages/docs/zh/api/modules/pinia.md
packages/docs/zh/core-concepts/plugins.md
packages/docs/zh/ssr/index.md
packages/docs/zh/ssr/nuxt.md

index ee30fc7f4f345ef59d49dc1dc20638c6f0b805af..37a8b95a139e342d6784fa2344b27cbf4867c746 100644 (file)
@@ -99,7 +99,7 @@ export const enConfig: LocaleSpecificConfig<DefaultTheme.Config> = {
               link: '/ssr/',
             },
             {
-              text: 'Nuxt.js',
+              text: 'Nuxt',
               link: '/ssr/nuxt.html',
             },
           ],
index df28318f0ef873bdb824b3a4c8a15f6fcd4cc9b4..85e109720bb4fa7d93b3fc5c6c275d90587b4dc8 100644 (file)
@@ -113,7 +113,7 @@ export const zhConfig: LocaleSpecificConfig<DefaultTheme.Config> = {
               link: '/zh/ssr/',
             },
             {
-              text: 'Nuxt.js',
+              text: 'Nuxt',
               link: '/zh/ssr/nuxt.html',
             },
           ],
index 1d1001c9a5a820375ce795edf4792b22c6f633c5..4eac7dccee0696f4f1aa19607bd7ce1de9257ccb 100644 (file)
@@ -6,7 +6,7 @@
 />
 
 :::tip
-If you are using **Nuxt.js,** you need to read [**these instructions**](./nuxt.md) instead.
+If you are using **Nuxt,** you need to read [**these instructions**](./nuxt.md) instead.
 :::
 
 Creating stores with Pinia should work out of the box for SSR as long as you call your `useStore()` functions at the top of `setup` functions, `getters` and `actions`:
@@ -63,7 +63,7 @@ onServerPrefetch(async () => {
 
 ## State hydration
 
-To hydrate the initial state, you need to make sure the rootState is included somewhere in the HTML for Pinia to pick it up later on. Depending on what you are using for SSR, **you should escape the state for security reasons**. We recommend using [devalue](https://github.com/Rich-Harris/devalue) which is the one used by Nuxt.js:
+To hydrate the initial state, you need to make sure the rootState is included somewhere in the HTML for Pinia to pick it up later on. Depending on what you are using for SSR, **you should escape the state for security reasons**. We recommend using [devalue](https://github.com/Rich-Harris/devalue) which is the one used by Nuxt:
 
 ```js
 import devalue from 'devalue'
index 592ab0fca31d3a6a2c4fc800cf8e81cef7cf4ade..2bcbf00796db869911c34a66dea559ee0f303356 100644 (file)
@@ -1,4 +1,4 @@
-# Nuxt.js
+# Nuxt
 
 <MasteringPiniaLink
   href="https://masteringpinia.com/lessons/ssr-friendly-state"
index 26a4b991c87c4fd79f0a122bdbb91bacab0f142c..982cde43083bd44a074eff3777d661beddbbf612 100644 (file)
@@ -552,7 +552,7 @@ Store augmented with getters. For internal usage only.
 • **PiniaVuePlugin**: `Plugin`
 
 Vue 2 插件,必须安装该插件才能使 pinia 工作。
-注意,**如果你使用的是 Nuxt.js,那你不需要这个插件**。请使用 `buildModule` 代替:
+注意,**如果你使用的是 Nuxt,那你不需要这个插件**。请使用 `buildModule` 代替:
 <https://pinia.vuejs.org/zh/ssr/nuxt.html>
 
 **`Example`**
index 7f5065affceffd018e4714d2550b2f34931cc611..bd754c9a7ddd1d29b297b59573ae5a42edb768dd 100644 (file)
@@ -397,7 +397,7 @@ declare module 'pinia' {
 还有一个可以从一个 store 类型中提取 _getter_ 的 `StoreGetters` 类型。你也可以且**只可以**通过扩展 `DefineStoreOptions` 或 `DefineSetupStoreOptions` 类型来扩展 _setup store_ 或 _option store_ 的选项。
 :::
 
-## Nuxt.js %{#nuxt-js}%
+## Nuxt %{#nuxt}%
 
 当[在 Nuxt 中使用 pinia](../ssr/nuxt.md) 时,你必须先创建一个 [Nuxt 插件](https://nuxt.com/docs/guide/directory-structure/plugins)。这样你才能访问到 `pinia` 实例:
 
@@ -429,9 +429,9 @@ export default myPlugin
 
 :::
 
-### Nuxt.js 2
+### Nuxt 2
 
-如果你使用的是 Nuxt.js 2,其类型会稍有不同:
+如果你使用的是 Nuxt 2,其类型会稍有不同:
 
 ```ts{3,15-17}
 // plugins/myPiniaPlugin.ts
index 83d80e46a9b76f04fa7ce8b55399b1e364d91828..d5b9bf0fd219882f93e91b50570a26744cb9b566 100644 (file)
@@ -6,7 +6,7 @@
 />
 
 :::tip
-如果你使用的是 **Nuxt.js**,你需要阅读的是[**这些说明文档**](./nuxt.md)。
+如果你使用的是 **Nuxt**,你需要阅读的是[**这些说明文档**](./nuxt.md)。
 :::
 
 只要你只在 `setup` 函数、`getter` 和 `action` 的顶部调用你定义的 `useStore()` 函数,那么使用 Pinia 创建 store 对于 SSR 来说应该是开箱即用的:
@@ -51,7 +51,7 @@ export default {
 
 ## State 激活 %{#state-hydration}%
 
-为了激活初始 state,你需要确保 rootState 包含在 HTML 中的某个地方,以便 Pinia 稍后能够接收到它。根据你服务端所渲染的内容,**为了安全你应该转义 state**。我们推荐 Nuxt.js 目前使用的 [@nuxt/devalue](https://github.com/nuxt-contrib/devalue):
+为了激活初始 state,你需要确保 rootState 包含在 HTML 中的某个地方,以便 Pinia 稍后能够接收到它。根据你服务端所渲染的内容,**为了安全你应该转义 state**。我们推荐 Nuxt 目前使用的 [@nuxt/devalue](https://github.com/nuxt-contrib/devalue):
 
 ```js
 import devalue from '@nuxt/devalue'
index 81d60a73669c22db917b02aaaad9aa885096ee09..46b2580d21fbcd9911d480725a8b9e0503f7ff01 100644 (file)
@@ -1,4 +1,4 @@
-# Nuxt.js %{#nuxt-js}%
+# Nuxt %{#nuxt}%
 
 <MasteringPiniaLink
   href="https://masteringpinia.com/lessons/ssr-friendly-state"