diff --git a/docs/.vitepress/sidebar/index.ts b/docs/.vitepress/sidebar/index.ts index e534b7752..a246fa49f 100644 --- a/docs/.vitepress/sidebar/index.ts +++ b/docs/.vitepress/sidebar/index.ts @@ -1,8 +1,445 @@ export default { - "/BackEnd/": [], - "/Framework/": [], - "/FrontEnd/": [], + "/BackEnd/": [ + { + "text": "NodeJS", + "collapsible": true, + "collapsed": false, + "items": [ + { + "text": "MongoDB笔记", + "link": "/BackEnd/NodeJS/MongoDB笔记" + }, + { + "text": "Node大文件上传", + "link": "/BackEnd/NodeJS/Node大文件上传" + }, + { + "text": "Node学习笔记", + "link": "/BackEnd/NodeJS/Node学习笔记" + }, + { + "text": "Node简单上传文件", + "link": "/BackEnd/NodeJS/Node简单上传文件" + } + ] + }, + { + "text": "Server", + "collapsible": true, + "collapsed": false, + "items": [ + { + "text": "Docker学习笔记", + "link": "/BackEnd/Server/Docker学习笔记" + }, + { + "text": "Nginx学习笔记", + "link": "/BackEnd/Server/Nginx学习笔记" + } + ] + } + ], + "/Framework/": [ + { + "text": "Angular", + "collapsible": true, + "collapsed": false, + "items": [ + { + "text": "Angular基础总结一", + "link": "/Framework/Angular/Angular基础总结一" + }, + { + "text": "Angular基础总结三", + "link": "/Framework/Angular/Angular基础总结三" + }, + { + "text": "Angular基础总结二", + "link": "/Framework/Angular/Angular基础总结二" + } + ] + }, + { + "text": "React", + "collapsible": true, + "collapsed": false, + "items": [ + { + "text": "React基础总结一", + "link": "/Framework/React/React基础总结一" + } + ] + }, + { + "text": "Vitest", + "collapsible": true, + "collapsed": false, + "items": [ + { + "text": "测试流程", + "link": "/Framework/Vitest/测试流程" + } + ] + }, + { + "text": "Vue", + "collapsible": true, + "collapsed": false, + "items": [ + { + "text": "Vite原理学习", + "link": "/Framework/Vue/Vite原理学习" + }, + { + "text": "Vue2项目迁移Vite5", + "link": "/Framework/Vue/Vue2项目迁移Vite5" + }, + { + "text": "Vue3补漏笔记", + "link": "/Framework/Vue/Vue3补漏笔记" + }, + { + "text": "分页与搜索条件记录并回显优化", + "link": "/Framework/Vue/分页与搜索条件记录并回显优化" + }, + { + "text": "列表最后一条数据删除处理", + "link": "/Framework/Vue/列表最后一条数据删除处理" + }, + { + "text": "网站添加 PWA", + "link": "/Framework/Vue/网站添加 PWA" + } + ] + } + ], + "/FrontEnd/": [ + { + "text": "CSS", + "collapsible": true, + "collapsed": false, + "items": [ + { + "text": "Grid布局学习笔记", + "link": "/FrontEnd/CSS/Grid布局学习笔记" + }, + { + "text": "常用代码段", + "link": "/FrontEnd/CSS/常用代码段" + }, + { + "text": "揭秘读书摘要", + "link": "/FrontEnd/CSS/揭秘读书摘要" + } + ] + }, + { + "text": "Git", + "collapsible": true, + "collapsed": false, + "items": [ + { + "text": "Git常用操作", + "link": "/FrontEnd/Git/Git常用操作" + }, + { + "text": "Terminal终端美化", + "link": "/FrontEnd/Git/Terminal终端美化" + }, + { + "text": "配置 Ubuntu 服务器免密登录", + "link": "/FrontEnd/Git/配置 Ubuntu 服务器免密登录" + }, + { + "text": "配置多个平台SSH", + "link": "/FrontEnd/Git/配置多个平台SSH" + } + ] + }, + { + "text": "JavaScript", + "collapsible": true, + "collapsed": false, + "items": [ + { + "text": "async与await", + "link": "/FrontEnd/JavaScript/async与await" + }, + { + "text": "代码分支优化", + "link": "/FrontEnd/JavaScript/代码分支优化" + }, + { + "text": "图片懒加载", + "link": "/FrontEnd/JavaScript/图片懒加载" + }, + { + "text": "基础复习一", + "link": "/FrontEnd/JavaScript/基础复习一" + }, + { + "text": "基础复习二", + "link": "/FrontEnd/JavaScript/基础复习二" + }, + { + "text": "常见算法", + "link": "/FrontEnd/JavaScript/常见算法" + }, + { + "text": "手写Promise", + "link": "/FrontEnd/JavaScript/手写Promise" + }, + { + "text": "数据去重", + "link": "/FrontEnd/JavaScript/数据去重" + }, + { + "text": "数组求集合", + "link": "/FrontEnd/JavaScript/数组求集合" + }, + { + "text": "文件系统", + "link": "/FrontEnd/JavaScript/文件系统" + }, + { + "text": "易混淆的位置属性", + "link": "/FrontEnd/JavaScript/易混淆的位置属性" + }, + { + "text": "正则表达式", + "link": "/FrontEnd/JavaScript/正则表达式" + }, + { + "text": "获取目录结构", + "link": "/FrontEnd/JavaScript/获取目录结构" + }, + { + "text": "高阶函数", + "link": "/FrontEnd/JavaScript/高阶函数" + } + ] + }, + { + "text": "Other", + "collapsible": true, + "collapsed": false, + "items": [ + { + "text": "Mac系统环境快速搭建", + "link": "/FrontEnd/Other/Mac系统环境快速搭建" + }, + { + "text": "package文件详解", + "link": "/FrontEnd/Other/package文件详解" + } + ] + }, + { + "text": "Shell", + "collapsible": true, + "collapsed": false, + "items": [ + { + "text": "自动部署脚本", + "link": "/FrontEnd/Shell/自动部署脚本" + }, + { + "text": "获取页面所有域名并去重", + "link": "/FrontEnd/Shell/获取页面所有域名并去重" + } + ] + }, + { + "text": "TypeScript", + "collapsible": true, + "collapsed": false, + "items": [ + { + "text": "初学笔记", + "link": "/FrontEnd/TypeScript/初学笔记" + }, + { + "text": "进阶使用技巧", + "link": "/FrontEnd/TypeScript/进阶使用技巧" + }, + { + "text": "配置文件详解", + "link": "/FrontEnd/TypeScript/配置文件详解" + } + ] + } + ], "/GoodTool/": [], - "/Interview/": [], - "/Problem/": [] + "/Interview/": [ + { + "text": "Brower", + "collapsible": true, + "collapsed": false, + "items": [ + { + "text": "事件循环机制", + "link": "/Interview/Brower/事件循环机制" + }, + { + "text": "浏览器网页请求过程", + "link": "/Interview/Brower/浏览器网页请求过程" + }, + { + "text": "计算机网络", + "link": "/Interview/Brower/计算机网络" + } + ] + }, + { + "text": "CSS", + "collapsible": true, + "collapsed": false, + "items": [ + { + "text": "基础面试题", + "link": "/Interview/CSS/基础面试题" + }, + { + "text": "进阶面试题", + "link": "/Interview/CSS/进阶面试题" + }, + { + "text": "高级面试题", + "link": "/Interview/CSS/高级面试题" + } + ] + }, + { + "text": "JavaScript", + "collapsible": true, + "collapsed": false, + "items": [ + { + "text": "Promise相关", + "link": "/Interview/JavaScript/Promise相关" + }, + { + "text": "原型与原型链", + "link": "/Interview/JavaScript/原型与原型链" + }, + { + "text": "基础面试题", + "link": "/Interview/JavaScript/基础面试题" + }, + { + "text": "字符串常用方法", + "link": "/Interview/JavaScript/字符串常用方法" + }, + { + "text": "进阶面试题", + "link": "/Interview/JavaScript/进阶面试题" + }, + { + "text": "高级面试题", + "link": "/Interview/JavaScript/高级面试题" + } + ] + }, + { + "text": "Vue", + "collapsible": true, + "collapsed": false, + "items": [ + { + "text": "Vue响应式原理", + "link": "/Interview/Vue/Vue响应式原理" + }, + { + "text": "Vue基础篇", + "link": "/Interview/Vue/Vue基础篇" + }, + { + "text": "Vue声明周期", + "link": "/Interview/Vue/Vue声明周期" + }, + { + "text": "Vue进阶篇", + "link": "/Interview/Vue/Vue进阶篇" + }, + { + "text": "npm run xxx执行过程", + "link": "/Interview/Vue/npm run xxx执行过程" + }, + { + "text": "前端项目优化", + "link": "/Interview/Vue/前端项目优化" + }, + { + "text": "常见Path区别", + "link": "/Interview/Vue/常见Path区别" + }, + { + "text": "自定义指令", + "link": "/Interview/Vue/自定义指令" + } + ] + } + ], + "/Problem/": [ + { + "text": "Graphical", + "collapsible": true, + "collapsed": false, + "items": [ + { + "text": "Antv代码片段集锦", + "link": "/Problem/Graphical/Antv代码片段集锦" + }, + { + "text": "Antv使用总结", + "link": "/Problem/Graphical/Antv使用总结" + }, + { + "text": "Echarts问题总结", + "link": "/Problem/Graphical/Echarts问题总结" + } + ] + }, + { + "text": "Nuxt3", + "collapsible": true, + "collapsed": false, + "items": [ + { + "text": "Nuxt3项目踩坑", + "link": "/Problem/Nuxt3/Nuxt3项目踩坑" + } + ] + }, + { + "text": "VitePress", + "collapsible": true, + "collapsed": false, + "items": [ + { + "text": "VitePress踩坑记录", + "link": "/Problem/VitePress/VitePress踩坑记录" + }, + { + "text": "VuePress踩坑记录", + "link": "/Problem/VitePress/VuePress踩坑记录" + } + ] + }, + { + "text": "VueProject", + "collapsible": true, + "collapsed": false, + "items": [ + { + "text": "VueRouter加密query", + "link": "/Problem/VueProject/VueRouter加密query" + }, + { + "text": "Vue项目踩坑一", + "link": "/Problem/VueProject/Vue项目踩坑一" + } + ] + } + ] } \ No newline at end of file diff --git a/docs/vite.config.ts b/docs/vite.config.ts index 1f8ac03c4..df8a2e899 100644 --- a/docs/vite.config.ts +++ b/docs/vite.config.ts @@ -13,6 +13,11 @@ export default defineConfig({ 'vitepress', ], }, + server: { + hmr: { + overlay: false + } + }, plugins: [ Components({ dirs: resolve(__dirname, '.vitepress/theme/components'), diff --git a/scripts/generate-sidebar.cjs b/scripts/generate-sidebar.cjs index fc216b64d..dffd9de76 100644 --- a/scripts/generate-sidebar.cjs +++ b/scripts/generate-sidebar.cjs @@ -6,7 +6,7 @@ const sidebarPath = path.resolve(__dirname, '../docs/.vitepress/sidebar/index.ts // 判断是否是文章文件 function isArticleDir(dir) { - const isExclude = /^public|index.md|.*\.ts|demo.*|\..*$/.test(dir) + const isExclude = /^(public|index.md|.*\.ts|demo.*|\..*)$/.test(dir) return !isExclude }