Skip to content

Commit dfffd50

Browse files
committed
Update docs and config
1 parent 232356d commit dfffd50

File tree

5 files changed

+91
-40
lines changed

5 files changed

+91
-40
lines changed

docs/reference/cli.mdx

+8-5
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,17 @@ $ aiscript new [PROJECT_NAME]
2323
**Example:**
2424

2525
```bash
26-
$ aiscript new my-project
27-
28-
$ tree my-project
29-
my-project
26+
$ aiscript new test-project
27+
Successfully created new AIScript project: test-project
28+
Project structure:
29+
test-project
3030
├── lib/
31-
├── migrations/
3231
├── routes/
32+
│ └── index.ai
3333
└── project.toml
34+
35+
36+
Run `aiscript serve` to start the server.
3437
```
3538

3639
### aiscript serve

docs/reference/directives/validator.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -121,15 +121,15 @@ post /api/user {
121121
Validates arrays against specified constraints.
122122

123123
Parameters:
124-
- `min_items`: Minimum number of items
125-
- `max_items`: Maximum number of items
124+
- `min_len`: Minimum number of items
125+
- `max_len`: Maximum number of items
126126
- `unique`: Whether items must be unique
127127

128128
```js
129129
post /api/tags {
130130
@json
131131
body {
132-
@array(min_items=1, max_items=5, unique=true)
132+
@array(min_len=1, max_len=5, unique=true)
133133
tags: array
134134
}
135135
}

package-lock.json

+24
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+2
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
"devDependencies": {
1818
"@biomejs/biome": "^1.9.4",
1919
"@eslint/js": "^9.19.0",
20+
"rsbuild-plugin-open-graph": "1.0",
21+
"rspress-plugin-sitemap": "^1.1",
2022
"@rsbuild/plugin-yaml": "^1.0.2",
2123
"@types/node": "^18.11.17",
2224
"eslint": "^9.19.0",

rspress.config.ts

+54-32
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,62 @@
11
import * as path from 'node:path';
22
import { defineConfig } from 'rspress/config';
33
import { pluginYaml } from "@rsbuild/plugin-yaml";
4+
import { pluginOpenGraph } from 'rsbuild-plugin-open-graph';
5+
import pluginSitemap from 'rspress-plugin-sitemap';
46

7+
const PUBLISH_URL = 'https://aiscript.dev';
58
export default defineConfig({
6-
root: path.join(__dirname, 'docs'),
7-
title: 'AIScript',
8-
icon: '/toucan.png',
9-
logo: {
10-
light: '/aiscript-logo.svg',
11-
dark: '/aiscript-logo-white.svg',
12-
},
13-
route: {
14-
cleanUrls: true,
15-
},
16-
mediumZoom: true,
17-
builderPlugins: [pluginYaml()],
18-
globalStyles: path.join(__dirname, 'theme/index.css'),
19-
themeConfig: {
20-
enableScrollToTop: true,
21-
footer: {
22-
message: '<p>AIScript Community &copy; 2025.</p>',
9+
root: path.join(__dirname, 'docs'),
10+
title: 'AIScript',
11+
icon: '/toucan.png',
12+
logo: {
13+
light: '/aiscript-logo.svg',
14+
dark: '/aiscript-logo-white.svg',
2315
},
24-
lastUpdated: true,
25-
prevPageText: 'Prev Page',
26-
nextPageText: 'Next Page',
27-
socialLinks: [
28-
{
29-
icon: 'github',
30-
mode: 'link',
31-
content: 'https://github.com/aiscriptdev/aiscript',
32-
},
33-
{
34-
icon: 'discord',
35-
mode: 'link',
36-
content: 'https://discord.gg/bXRqsweNPb',
37-
},
16+
search: {
17+
codeBlocks: true,
18+
},
19+
route: {
20+
cleanUrls: true,
21+
},
22+
ssg: {
23+
strict: true,
24+
},
25+
mediumZoom: true,
26+
plugins: [
27+
pluginSitemap({
28+
domain: PUBLISH_URL,
29+
}),
3830
],
39-
},
31+
builderPlugins: [
32+
pluginOpenGraph({
33+
title: 'AIScript',
34+
type: 'website',
35+
url: PUBLISH_URL,
36+
description: 'AIScript is a unique combination of interpreter programming language and web framework, both written in Rust, designed to help developers build AI applications effortlessly.',
37+
}),
38+
pluginYaml(),
39+
],
40+
globalStyles: path.join(__dirname, 'theme/index.css'),
41+
themeConfig: {
42+
enableScrollToTop: true,
43+
footer: {
44+
message: '<p>AIScript Community &copy; 2025.</p>',
45+
},
46+
lastUpdated: true,
47+
prevPageText: 'Prev Page',
48+
nextPageText: 'Next Page',
49+
socialLinks: [
50+
{
51+
icon: 'github',
52+
mode: 'link',
53+
content: 'https://github.com/aiscriptdev/aiscript',
54+
},
55+
{
56+
icon: 'discord',
57+
mode: 'link',
58+
content: 'https://discord.gg/bXRqsweNPb',
59+
},
60+
],
61+
},
4062
});

0 commit comments

Comments
 (0)