import { defineConfig } from 'vitepress' import type { DefaultTheme } from 'vitepress' // https://vitepress.dev/reference/site-config export default defineConfig({ title: "梦宁软件", head: [ ['link', { rel: 'stylesheet', href: '/theme/style.css' }], // 引入CSS ['link', { rel: 'icon', href: '/mengninglogo.png' }] // 设置favicon ], description: "梦宁软件", themeConfig: { // https://vitepress.dev/reference/default-theme-config outlineTitle: '目录', outline: [2, 6], logo: { src: '/mnsoftware.png', }, nav: [ // { text: '文档', link: '/src/document/index' }, // { text: 'DevStar', link: '/src/devstar' }, { text: '编译加速', link: '/src/compile' }, { text: '虚拟仿真', link: '/src/simulator' }, { text: 'Enterprise', link: '/src/enterprise' }, ], sidebar: { '/src/devstar/': sidebarDevStar(), // 直接返回 SidebarItem[] '/src/compile/': sidebarCompiling(), '/src/simulator/': sidebarSimulator(), '/src/enterprise/': sidebarEnterprise() }, socialLinks: [ { icon: 'github', link: ' https://github.com/mengning/DevStar' } ], // footer: [ // copyright: 'Copyright © 2025-present devstar contributors', // [Copyright © 2025-present DevStar Contributors](https://github.com/mengning/DevStar) // { copyright: 'Copyright © 2025-present devstar contributors', link: 'https://github.com/mengning/DevStar' } // ] as any, // footer: { // message: '苏ICP备2024068144号-1 ©Mengning Software. 2025- All rights reserved.', // copyright: '' // }, // 设置搜索框的样式 search: { provider: "local", options: { translations: { button: { buttonText: "搜索文档", buttonAriaLabel: "搜索文档", }, modal: { noResultsText: "无法找到相关结果", resetButtonTitle: "清除查询条件", footer: { selectText: "选择", navigateText: "切换", }, }, }, }, }, } }) function sidebarDevStar(): DefaultTheme.SidebarItem[] { return [ { text: 'DevStar Studio', link: '/src/devstar/index', items: [ ] } as any, { text: 'AI+ DevOps', link: '/src/devstar/ai-devops', collapsible: true, // 使整个组可折叠 collapsed: false, // 默认展开 items: [ { text: 'AI Code Review', link: '/src/devstar/ai-code-reveiw' }, { text: 'MCP Server', link: '/src/devstar/mcp-server' }, ] } as any, { text: '安装', collapsible: true, // 使整个组可折叠 collapsed: false, // 默认展开 items: [ { text: '快速部署指南', link: 'src/devstar/install/quick-start' }, { text: '云原生环境部署指南', link: 'src/devstar/install/install-k8s' }, { text: 'app.ini配置文件', link: 'src/devstar/install/app-ini' }, ] } as any, { text: '使用', collapsible: true, // 使整个组可折叠 collapsed: false, // 默认展开 items: [ { text: '快速入门AI+', link: 'src/devstar/usage/quick-start-with-ai' }, { text: 'CI/CD工作流Actions', collapsible: true, // 使整个组可折叠 collapsed: false, // 默认展开 items: [ { text: 'Overview', link: 'src/devstar/actions/overview' }, { text: '快速入门', link: 'src/devstar/actions/quickstart' }, ] }, { text: '开发容器DevContainer', collapsible: true, // 使整个组可折叠 collapsed: false, // 默认展开 items: [ { text: 'Overview', link: 'src/devstar/devcontainer/overview' }, { text: '快速入门', link: 'src/devstar/devcontainer/quickstart' }, ] }, ] } as any, { text: '更多帮助', collapsible: true, // 使整个组可折叠 collapsed: false, // 默认展开 items: [ { text: 'Gitea常见问题', link: 'https://docs.gitea.com/zh-cn/help/faq' }, ] } as any, ] } function sidebarSimulator(): DefaultTheme.SidebarItem[] { return [ { text: '虚拟仿真技术', link: '/src/simulator/index', items: [ ] }, { text: '虚拟ECU', link: '/src/simulator/vECU', items: [ ] } as any, { text: '整车系统级软硬件联合仿真', link: '/src/simulator/vehicle-simulator', items: [] }, ] } function sidebarCompiling(): DefaultTheme.SidebarItem[] { return [ { text: '编译加速', link: '/src/compile/index', items: [ ] }, { text: '分布式编译系统', collapsible: true, // 使整个组可折叠 collapsed: false, // 默认展开 items: [ { text: '为什么需要分布式编译?', link: '/src/compile/why-distributed-compiling' }, { text: 'CloudBuild分布式编译', link: '/src/compile/cloudbuild' }, { text: 'ShareBuild共享编译', link: '/src/compile/sharebuild' }, ] } as any, { text: 'AI Compiler', collapsible: true, // 使整个组可折叠 collapsed: false, // 默认展开 items: [ { text: 'AI Compiler简介', link: '/src/compile/why-distributed-compiling' }, { text: 'CloudBuild', link: '/src/compile/cloudbuild' }, { text: 'ShareBuild', link: '/src/compile/sharebuild' }, ] } as any, { text: 'PGO/LTO', collapsible: true, // 使整个组可折叠 collapsed: false, // 默认展开 items: [ { text: 'PGO/LTO简介', link: '/src/compile/why-distributed-compiling' }, { text: 'CloudBuild', link: '/src/compile/cloudbuild' }, { text: 'ShareBuild', link: '/src/compile/sharebuild' }, ] }, ] } function sidebarEnterprise(): DefaultTheme.SidebarItem[] { return [ { text: 'DevStar Enterprise', link: '/src/enterprise/index', items: [ ] }, { text: '常见问题FAQ', link: '/src/enterprise/faq', items: [] }, ] }