|
1 | 1 | import * as path from 'node:path'; |
2 | 2 | import { defineConfig } from 'rspress/config'; |
3 | 3 | import { pluginYaml } from "@rsbuild/plugin-yaml"; |
| 4 | +import { pluginOpenGraph } from 'rsbuild-plugin-open-graph'; |
| 5 | +import pluginSitemap from 'rspress-plugin-sitemap'; |
4 | 6 |
|
| 7 | +const PUBLISH_URL = 'https://aiscript.dev'; |
5 | 8 | 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 © 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', |
23 | 15 | }, |
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 | + }), |
38 | 30 | ], |
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 © 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 | + }, |
40 | 62 | }); |
0 commit comments