Skip to content

Commit

Permalink
fix: 文档添加 tailwindcss
Browse files Browse the repository at this point in the history
  • Loading branch information
besscroft committed Apr 10, 2024
1 parent 03bfd13 commit 945cd0a
Show file tree
Hide file tree
Showing 6 changed files with 401 additions and 39 deletions.
68 changes: 38 additions & 30 deletions docs/astro.config.mjs
Original file line number Diff line number Diff line change
@@ -1,35 +1,43 @@
import { defineConfig } from 'astro/config';
import starlight from '@astrojs/starlight';

import tailwind from '@astrojs/tailwind';

// https://astro.build/config
export default defineConfig({
integrations: [
starlight({
title: 'Pic Impact',
defaultLocale: 'root',
locales: {
root: {
label: '简体中文',
lang: 'zh-CN',
},
},
social: {
github: 'https://github.com/besscroft/PicImpact',
},
sidebar: [
{
label: '从这里开始',
autogenerate: { directory: 'quick' },
},
{
label: '指南',
autogenerate: { directory: 'guides' },
},
{
label: '参考',
autogenerate: { directory: 'reference' },
},
],
}),
],
});
integrations: [starlight({
title: 'Pic Impact',
defaultLocale: 'root',
locales: {
root: {
label: '简体中文',
lang: 'zh-CN'
}
},
customCss: [
'./src/global.css'
],
social: {
github: 'https://github.com/besscroft/PicImpact'
},
sidebar: [{
label: '从这里开始',
autogenerate: {
directory: 'quick'
}
}, {
label: '指南',
autogenerate: {
directory: 'guides'
}
}, {
label: '参考',
autogenerate: {
directory: 'reference'
}
}]
}), tailwind({
// 禁用默认的基础样式
applyBaseStyles: false,
})]
});
5 changes: 4 additions & 1 deletion docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,13 @@
"astro": "astro"
},
"dependencies": {
"@astrojs/check": "^0.5.10",
"@astrojs/starlight": "^0.21.5",
"@astrojs/starlight-tailwind": "^2.0.2",
"@astrojs/tailwind": "^5.1.0",
"astro": "^4.3.5",
"sharp": "^0.32.5",
"@astrojs/check": "^0.5.10",
"tailwindcss": "^3.4.3",
"typescript": "^5.4.4"
}
}
Loading

0 comments on commit 945cd0a

Please sign in to comment.