| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990 |
- import * as path from 'node:path';
- import { defineConfig } from 'rspress/config';
- import { pluginPlayground } from '@rspress/plugin-playground';
- export default defineConfig({
- root: path.join(__dirname, 'src'),
- base: '/',
- title: 'FlowGram.AI',
- globalStyles: path.join(__dirname, './global.less'),
- builderConfig: {
- tools: {
- rspack: {
- // 禁用 ES 模块输出(启用 CommonJS)
- experiments: {
- outputModule: false,
- },
- // 允许省略文件扩展名
- resolve: {
- fullySpecified: false,
- },
- },
- },
- },
- ssg: false,
- // locales 为一个对象数组
- locales: [
- {
- lang: 'en',
- // 导航栏切换语言的标签
- label: 'English',
- title: 'Rspress',
- description: 'Static Site Generator',
- },
- {
- lang: 'zh',
- label: '简体中文',
- title: 'Rspress',
- description: '静态网站生成器',
- },
- ],
- icon: '/logo.png',
- logo: {
- light: '/logo.png',
- dark: '/logo.png',
- },
- lang: 'zh',
- logoText: 'FlowGram.AI',
- plugins: [
- pluginPlayground({
- defaultDirection: 'vertical',
- include: [],
- }),
- ],
- themeConfig: {
- footer: {
- message: '© 2025 Bytedance Inc. All Rights Reserved.',
- },
- lastUpdated: true,
- locales: [
- {
- lang: 'en',
- label: 'en',
- outlineTitle: 'ON THIS Page',
- },
- {
- lang: 'zh',
- label: 'zh',
- outlineTitle: '大纲',
- },
- ],
- socialLinks: [
- {
- icon: 'github',
- mode: 'link',
- content: 'https://github.com/bytedance/flowgram.ai',
- },
- {
- icon: 'discord',
- mode: 'link',
- content: 'https://discord.gg/SwDWdrgA9f',
- },
- {
- icon: 'X',
- mode: 'link',
- content: 'https://x.com/FlowGramAI',
- },
- ],
- },
- });
|