Skip to content

Commit fa9c6dc

Browse files
docs(zh): sync translations (#3501)
sync with 1947617
1 parent c68f23d commit fa9c6dc

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

docs/zh/reference/site-config.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,16 +31,16 @@ export default {
3131
```ts
3232
import { defineConfig } from 'vitepress'
3333

34-
export default async () => defineConfig({
35-
const posts = await (await fetch('https://my-cms.com/blog-posts')).json()
34+
export default async () => {
35+
const posts = await (await fetch('https://my-cms.com/blog-posts')).json()
3636

37-
return {
37+
return defineConfig({
3838
// 应用级配置选项
3939
lang: 'en-US',
4040
title: 'VitePress',
4141
description: 'Vite & Vue powered static site generator.',
4242

43-
// 主题级别配置选项
43+
// 主题级配置选项
4444
themeConfig: {
4545
sidebar: [
4646
...posts.map((post) => ({
@@ -49,8 +49,8 @@ export default async () => defineConfig({
4949
}))
5050
]
5151
}
52-
}
53-
})
52+
})
53+
}
5454
```
5555

5656
也可以在最外层使用 `await`。例如:

0 commit comments

Comments
 (0)