Skip to content

Commit

Permalink
i18n(zh-cn): Update some reference modules
Browse files Browse the repository at this point in the history
  • Loading branch information
liruifengv committed Dec 17, 2024
1 parent a805ad1 commit 6ff1159
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/content/docs/zh-cn/reference/modules/astro-assets.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
---
title: 资源 API 参考
sidebar:
label: 'astro:assets'
i18nReady: true
tableOfContents:
minHeadingLevel: 2
Expand Down
2 changes: 2 additions & 0 deletions src/content/docs/zh-cn/reference/modules/astro-i18n.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
---
title: 国际化 API 参考
sidebar:
label: 'astro:i18n'
i18nReady: true
tableOfContents:
minHeadingLevel: 2
Expand Down
6 changes: 4 additions & 2 deletions src/content/docs/zh-cn/reference/modules/astro-middleware.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
---
title: 中间件 API 参考
sidebar:
label: 'astro:middleware'
i18nReady: true
tableOfContents:
minHeadingLevel: 2
Expand Down Expand Up @@ -64,7 +66,7 @@ export const onRequest = sequence(validation, auth, greeting);
<Since v="2.8.0" />
</p>

一个底层 API,用于创建一个 [`APIContext`](/zh-cn/reference/api-reference/#端点上下文) 以传递给 Astro 中间件的 `onRequest()` 函数。
一个底层 API,用于创建一个 [`APIContext`](/zh-cn/reference/api-reference/) 以传递给 Astro 中间件的 `onRequest()` 函数。

此函数可以由集成/适配器用于执行 Astro 中间件。

Expand Down Expand Up @@ -108,7 +110,7 @@ export function onRequest (context, next) {

`onRequest()` 的第一个参数是一个上下文对象。它反映了许多 `Astro` 全局属性。

<ReadMore>有关更多信息,请参阅 [端点上下文](/zh-cn/reference/api-reference/#端点上下文)。</ReadMore>
<ReadMore>有关更多信息,请参阅 [端点上下文](/zh-cn/reference/api-reference/)。</ReadMore>

#### `next()`

Expand Down

0 comments on commit 6ff1159

Please sign in to comment.