Skip to content

Commit 831cf66

Browse files
committed
fix: 文档添加 adapter
1 parent 03bfd13 commit 831cf66

File tree

4 files changed

+420
-39
lines changed

4 files changed

+420
-39
lines changed

docs/astro.config.mjs

Lines changed: 34 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,39 @@
11
import { defineConfig } from 'astro/config';
22
import starlight from '@astrojs/starlight';
33

4+
import vercel from "@astrojs/vercel/serverless";
5+
46
// https://astro.build/config
57
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-
});
8+
integrations: [starlight({
9+
title: 'Pic Impact',
10+
defaultLocale: 'root',
11+
locales: {
12+
root: {
13+
label: '简体中文',
14+
lang: 'zh-CN'
15+
}
16+
},
17+
social: {
18+
github: 'https://github.com/besscroft/PicImpact'
19+
},
20+
sidebar: [{
21+
label: '从这里开始',
22+
autogenerate: {
23+
directory: 'quick'
24+
}
25+
}, {
26+
label: '指南',
27+
autogenerate: {
28+
directory: 'guides'
29+
}
30+
}, {
31+
label: '参考',
32+
autogenerate: {
33+
directory: 'reference'
34+
}
35+
}]
36+
})],
37+
output: "server",
38+
adapter: vercel()
39+
});

docs/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,11 @@
1111
"astro": "astro"
1212
},
1313
"dependencies": {
14+
"@astrojs/check": "^0.5.10",
1415
"@astrojs/starlight": "^0.21.5",
16+
"@astrojs/vercel": "^7.5.2",
1517
"astro": "^4.3.5",
1618
"sharp": "^0.32.5",
17-
"@astrojs/check": "^0.5.10",
1819
"typescript": "^5.4.4"
1920
}
2021
}

0 commit comments

Comments
 (0)