Skip to content

Commit 03bfd13

Browse files
committed
feat: 新增文档
1 parent ea70333 commit 03bfd13

File tree

16 files changed

+4945
-1
lines changed

16 files changed

+4945
-1
lines changed

.gitignore

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,9 @@ dist
1313
/build
1414

1515
# local env files
16-
.env*.local
16+
.env*.local
17+
18+
# docs
19+
docs/node_modules
20+
docs/.astro/
21+
docs/dist/

docs/.vscode/extensions.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"recommendations": ["astro-build.astro-vscode"],
3+
"unwantedRecommendations": []
4+
}

docs/.vscode/launch.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"version": "0.2.0",
3+
"configurations": [
4+
{
5+
"command": "./node_modules/.bin/astro dev",
6+
"name": "Development server",
7+
"request": "launch",
8+
"type": "node-terminal"
9+
}
10+
]
11+
}

docs/astro.config.mjs

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
import { defineConfig } from 'astro/config';
2+
import starlight from '@astrojs/starlight';
3+
4+
// https://astro.build/config
5+
export default defineConfig({
6+
integrations: [
7+
starlight({
8+
title: 'Pic Impact',
9+
defaultLocale: 'root',
10+
locales: {
11+
root: {
12+
label: '简体中文',
13+
lang: 'zh-CN',
14+
},
15+
},
16+
social: {
17+
github: 'https://github.com/besscroft/PicImpact',
18+
},
19+
sidebar: [
20+
{
21+
label: '从这里开始',
22+
autogenerate: { directory: 'quick' },
23+
},
24+
{
25+
label: '指南',
26+
autogenerate: { directory: 'guides' },
27+
},
28+
{
29+
label: '参考',
30+
autogenerate: { directory: 'reference' },
31+
},
32+
],
33+
}),
34+
],
35+
});

docs/package.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"name": "pic-impact-docs",
3+
"type": "module",
4+
"version": "0.0.1",
5+
"private": true,
6+
"scripts": {
7+
"dev": "astro dev",
8+
"start": "astro dev",
9+
"build": "astro check && astro build",
10+
"preview": "astro preview",
11+
"astro": "astro"
12+
},
13+
"dependencies": {
14+
"@astrojs/starlight": "^0.21.5",
15+
"astro": "^4.3.5",
16+
"sharp": "^0.32.5",
17+
"@astrojs/check": "^0.5.10",
18+
"typescript": "^5.4.4"
19+
}
20+
}

0 commit comments

Comments
 (0)