docs(zh): sync translations (#3501)

sync with 1947617e34
pull/3502/head
Xavi Lee 2 years ago committed by GitHub
parent c68f23d31a
commit fa9c6dcfd2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -31,16 +31,16 @@ export default {
```ts ```ts
import { defineConfig } from 'vitepress' import { defineConfig } from 'vitepress'
export default async () => defineConfig({ export default async () => {
const posts = await (await fetch('https://my-cms.com/blog-posts')).json() const posts = await (await fetch('https://my-cms.com/blog-posts')).json()
return { return defineConfig({
// 应用级配置选项 // 应用级配置选项
lang: 'en-US', lang: 'en-US',
title: 'VitePress', title: 'VitePress',
description: 'Vite & Vue powered static site generator.', description: 'Vite & Vue powered static site generator.',
// 主题级配置选项 // 主题级配置选项
themeConfig: { themeConfig: {
sidebar: [ sidebar: [
...posts.map((post) => ({ ...posts.map((post) => ({
@ -49,8 +49,8 @@ export default async () => defineConfig({
})) }))
] ]
} }
} })
}) }
``` ```
也可以在最外层使用 `await`。例如: 也可以在最外层使用 `await`。例如:

Loading…
Cancel
Save