import { defineConfig } from 'vitepress' import { set_sidebar } from "../utils/auto_sidebar.js"; // https://vitepress.dev/reference/site-config export default defineConfig({ title: "devstar", head: [['link', { rel: 'icon', href: '/devstar-logo.png' }]], description: "A VitePress Site", themeConfig: { // https://vitepress.dev/reference/default-theme-config outlineTitle: '目录', outline: [2, 6], logo: '/devstar-logo.png', nav: [ { text: '文档', link: '/document/decription/关于devstar' }, { text: 'Examples', link: '/markdown-examples' } ], // sidebar: [ // { // text: 'Examples', // items: [ // { text: 'Markdown Examples', link: '/markdown-examples' }, // { text: 'Runtime API Examples', link: '/api-examples' } // ] // } // ], sidebar: { "/document/decription": set_sidebar("/document/decription"), }, socialLinks: [ { icon: 'github', link: ' https://github.com/mengning/DevStar' } ], footer: { copyright: 'Copyright © 2023-present devstar contributors', }, // 设置搜索框的样式 search: { provider: "local", options: { translations: { button: { buttonText: "搜索文档", buttonAriaLabel: "搜索文档", }, modal: { noResultsText: "无法找到相关结果", resetButtonTitle: "清除查询条件", footer: { selectText: "选择", navigateText: "切换", }, }, }, }, }, } })