Skip to content

Commit

Permalink
i18n(zh-cn): Update css-and-tailwind.mdx
Browse files Browse the repository at this point in the history
  • Loading branch information
liruifengv committed Nov 2, 2023
1 parent 8f7a0ef commit fcb95b5
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions docs/src/content/docs/zh-cn/guides/css-and-tailwind.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -181,17 +181,17 @@ yarn create astro --template starlight/tailwind
});
```

5. 将 Starlight Tailwind 插件添加到 `tailwind.config.cjs`
5. 将 Starlight Tailwind 插件添加到 `tailwind.config.mjs`

```js ins={2,7}
// tailwind.config.cjs
const starlightPlugin = require('@astrojs/starlight-tailwind');
// tailwind.config.mjs
import starlightPlugin from '@astrojs/starlight-tailwind';

/** @type {import('tailwindcss').Config} */
module.exports = {
content: ['./src/**/*.{astro,html,js,jsx,md,mdx,svelte,ts,tsx,vue}'],
plugins: [starlightPlugin()],
};
export default {
content: ['./src/**/*.{astro,html,js,jsx,md,mdx,svelte,ts,tsx,vue}'],
plugins: [starlightPlugin()],
};
```

### 使用 Tailwind 设置 Starlight 的样式
Expand All @@ -206,12 +206,12 @@ Starlight 将使用你的 [Tailwind 主题配置](https://tailwindcss.com/docs/t
- `fontFamily.mono` — 用于代码示例

```js {12,14,18,20}
// tailwind.config.cjs
const starlightPlugin = require('@astrojs/starlight-tailwind');
const colors = require('tailwindcss/colors');
// tailwind.config.mjs
import starlightPlugin from '@astrojs/starlight-tailwind';
import colors from 'tailwindcss/colors';

/** @type {import('tailwindcss').Config} */
module.exports = {
export default {
content: ['./src/**/*.{astro,html,js,jsx,md,mdx,svelte,ts,tsx,vue}'],
theme: {
extend: {
Expand Down

0 comments on commit fcb95b5

Please sign in to comment.