Skip to content

Commit

Permalink
i18n(zh-cn): Update guides/cms/ghost.mdx (#8579)
Browse files Browse the repository at this point in the history
* i18n(zh-cn): Update `guides/cms/ghost.mdx`

* 更新 ghost.mdx

Co-authored-by: liruifengv <[email protected]>

---------

Co-authored-by: liruifengv <[email protected]>
  • Loading branch information
100gle and liruifengv committed Jun 20, 2024
1 parent bbd71cc commit d570c0a
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/content/docs/zh-cn/guides/cms/ghost.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import PackageManagerTabs from '~/components/tabs/PackageManagerTabs.astro'
### 前置准备
在开始使用之前,你需要:

1. **一个 Astro 项目** - 如果没有 Astro 项目, 我们的 [安装指南](/zh-cn/install-and-setup/) 将在短时间内帮助你启动并运行。
1. **一个 Astro 项目** - 如果没有 Astro 项目我们的 [安装指南](/zh-cn/install-and-setup/) 将在短时间内帮助你启动并运行。

2. **一个 Ghost 站点** - 假定你已经配置了一个使用 Ghost 的站点。如果没有,可以根据 [Ghost 本地配置](https://ghost.org/docs/install/local/)在本地环境配置一个。

Expand Down Expand Up @@ -58,22 +58,25 @@ interface ImportMetaEnv {

### 安装依赖项

选择你喜欢的包管理器运行以下命令安装 Ghost 官方的内容 API 容器 [`@tryghost/content-api`](https://www.npmjs.com/package/@tryghost/content-api) 连接 Ghost:
选择你喜欢的包管理器运行以下命令安装 Ghost 官方的内容 API 容器 [`@tryghost/content-api`](https://www.npmjs.com/package/@tryghost/content-api) 连接 Ghost,如果你使用 TypeScript,还可以选择包含类型定义的包:

<PackageManagerTabs>
<Fragment slot="npm">
```shell
npm install @tryghost/content-api
npm install --save @types/tryghost__content-api
```
</Fragment>
<Fragment slot="pnpm">
```shell
pnpm add @tryghost/content-api
pnpm add --save-dev @types/tryghost__content-api
```
</Fragment>
<Fragment slot="yarn">
```shell
yarn add @tryghost/content-api
yarn add --dev @types/tryghost__content-api
```
</Fragment>
</PackageManagerTabs>
Expand Down Expand Up @@ -275,7 +278,7 @@ const { post } = Astro.props;
</html>
```
:::note[注意]
`<Fragment />` 是一个内置的 Astro 组件,它可以让你避免不必要的容器元素的影响。 这在从CMS(例如Ghost或[WordPress](/zh-cn/guides/cms/wordpress/))获取 HTML 时特别有用。
`<Fragment />` 是一个内置的 Astro 组件,它可以让你避免不必要的容器元素的影响。这在从 CMS(例如 Ghost 或[WordPress](/zh-cn/guides/cms/wordpress/))获取 HTML 时特别有用。
:::

### 发布你的网站
Expand Down

0 comments on commit d570c0a

Please sign in to comment.