diff --git a/docs/.vitepress/config.mts b/docs/.vitepress/config.mts index 2b58355..6c04e85 100644 --- a/docs/.vitepress/config.mts +++ b/docs/.vitepress/config.mts @@ -1,5 +1,6 @@ import { defineConfig } from 'vitepress' import { withMermaid } from 'vitepress-plugin-mermaid' +import { routers } from './theme/router' // https://vitepress.dev/reference/site-config export default withMermaid({ @@ -26,155 +27,13 @@ export default withMermaid({ // https://vitepress.dev/reference/default-theme-config nav: [ { text: '🏠 Home', link: '/' }, - { text: '🌐Web前端', - items: [ - { - text: 'Vue', - items: [ - { text: 'Vue3-Common', link: '/Web-Front/Vue/Vue3-Common' }, - { text: 'Vue3架构原理', link: '/Web-Front/Vue/Vue3-Architecture' } - ] - }, - { - text: '其他', - items: [ - { text: 'JavaScript知识点整理', link: '/Web-Front/Others/JavaScript-Guide' }, - { text: '前端包管理器', link: '/Web-Front/Others/Package' }, - { text: 'Vite核心原理', link: '/Web-Front/Others/Vite-Principle' }, - { text: '浏览器渲染全流程解析', link: '/Web-Front/Others/Browser-Process' } - ] - }, - ] - }, - { text: '🖥️ Web后端', - items: [ - { - text: 'SpringBoot', - items: [ - { text: 'Spring IOC简介', link: '/Web-Backend/SpringBoot/SpringIOC' }, - { text: 'SpringBoot启动流程', link: '/Web-Backend/SpringBoot/SpringBoot-Start-Process' }, - { text: 'Spring MVC简介', link: '/Web-Backend/SpringBoot/SpringMVC' }, - { text: 'SpringBoot Starter原理', link: '/Web-Backend/SpringBoot/SpringBootStarter' }, - { text: 'SpringBoot Bean简介', link: '/Web-Backend/SpringBoot/SpringBootBean' }, - { text: 'SpringBoot3原生镜像', link: '/Web-Backend/SpringBoot/SpringBoot3-GraalVM' }, - { text: 'SpingBoot技巧', link: '/Web-Backend/SpringBoot/SpingBoot-Skills' }, - { text: 'SpringBoot Common', link: '/Web-Backend/SpringBoot/SpringBoot-Common' } - ] - }, - { - text: 'FastAPI', - items: [ - { text: 'FastAPI基础教程', link: '/Web-Backend/FastAPI/FastAPI-Guide' }, - { text: '基于OAuth2的安全验证', link: '/Web-Backend/FastAPI/OAuth2' } - ] - }, - { - text: '其他', - items: [ - { text: 'MySQL知识点', link: '/Web-Backend/Others/MySQL-Knowledge' }, - { text: 'Flyway简单使用', link: '/Web-Backend/Others/Flyway' }, - { text: 'MyBatis简介和使用', link: '/Web-Backend/Others/MyBatis' }, - { text: 'RustFS简介和使用', link: '/Web-Backend/Others/RustFS' }, - { text: '网络编程简介', link: '/Web-Backend/Others/Netword-Program' } - ] - }, - ] - }, - { text: '🚀 DevOps', - items: [ - { text: 'OpenObserve部署和使用', link: '/DevOps/OpenObserve' }, - { text: 'Jenkins部署和使用', link: '/DevOps/Jenkins' }, - { text: 'ElasticSearch部署和使用', link: '/DevOps/ElasticSearch' }, - { text: 'Docker简介和安装', link: '/DevOps/Docker' } - ] - }, - { text: '📱 Flutter', - items: [ - { text: 'Dart基础教程', link: '/Flutter/DartGuide' }, - { text: 'Flutter基础教程', link: '/Flutter/FlutterGuide' }, - { text: '实战技巧', link: '/Flutter/Practice' } - ] - }, + ...routers ], sidebar: { - '/Web-Front/': [ - { - text: 'Web前端', - items: [ - { - text: 'Vue', - items: [ - { text: 'Vue3-Common', link: '/Web-Front/Vue/Vue3-Common' }, - { text: 'Vue3架构原理', link: '/Web-Front/Vue/Vue3-Architecture' } - ] - }, - { - text: 'Others', - items: [ - { text: 'JavaScript知识点整理', link: '/Web-Front/Others/JavaScript-Guide' }, - { text: '前端包管理器', link: '/Web-Front/Others/Package' }, - { text: 'Vite核心原理', link: '/Web-Front/Others/Vite-Principle' }, - { text: '浏览器渲染全流程解析', link: '/Web-Front/Others/Browser-Process' } - ] - }, - ] - }, - ], - '/Web-Backend/': [ - { - text: 'Web后端', - items: [ - { text: 'SpringBoot', - items: [ - { text: 'Spring IOC简介', link: '/Web-Backend/SpringBoot/SpringIOC' }, - { text: 'SpringBoot启动流程', link: '/Web-Backend/SpringBoot/SpringBoot-Start-Process' }, - { text: 'Spring MVC简介', link: '/Web-Backend/SpringBoot/SpringMVC' }, - { text: 'SpringBoot Starter原理', link: '/Web-Backend/SpringBoot/SpringBootStarter' }, - { text: 'SpringBoot Bean简介', link: '/Web-Backend/SpringBoot/SpringBootBean' }, - { text: 'SpringBoot3原生镜像', link: '/Web-Backend/SpringBoot/SpringBoot3-GraalVM' }, - { text: 'SpingBoot技巧', link: '/Web-Backend/SpringBoot/SpingBoot-Skills' }, - { text: 'SpringBoot Common', link: '/Web-Backend/SpringBoot/SpringBoot-Common' } - ] - }, - { text: 'FastAPI', - items: [ - { text: 'FastAPI基础教程', link: '/Web-Backend/FastAPI/FastAPI-Guide' }, - { text: '基于OAuth2的安全验证', link: '/Web-Backend/FastAPI/OAuth2' } - ] - }, - { text: '其他', - items: [ - { text: 'MySQL知识点', link: '/Web-Backend/Others/MySQL-Knowledge' }, - { text: 'Flyway简单使用', link: '/Web-Backend/Others/Flyway' }, - { text: 'MyBatis简介和使用', link: '/Web-Backend/Others/MyBatis' }, - { text: 'RustFS简介和使用', link: '/Web-Backend/Others/RustFS' }, - { text: '网络编程简介', link: '/Web-Backend/Others/Netword-Program' } - ] - } - ], - }, - ], - '/DevOps/': [ - { - text: 'DevOps', - items: [ - { text: 'OpenObserve部署和使用', link: '/DevOps/OpenObserve' }, - { text: 'Jenkins部署和使用', link: '/DevOps/Jenkins' }, - { text: 'ElasticSearch部署和使用', link: '/DevOps/ElasticSearch' }, - { text: 'Docker简介和安装', link: '/DevOps/Docker' } - ] - } - ], - '/Flutter/': [ - { - text: 'Flutter', - items: [ - { text: 'Dart基础教程', link: '/Flutter/DartGuide' }, - { text: 'Flutter基础教程', link: '/Flutter/FlutterGuide' }, - { text: '实战技巧', link: '/Flutter/Practice' } - ] - } - ] + '/Web-Front/': [routers[0]], + '/Web-Backend/': [routers[1]], + '/DevOps/': [routers[2]], + '/Flutter/': [routers[3]] }, // socialLinks: [ diff --git a/docs/.vitepress/theme/components/ArticleMetadata.vue b/docs/.vitepress/theme/components/ArticleMetadata.vue index a1044d7..27bf7bf 100644 --- a/docs/.vitepress/theme/components/ArticleMetadata.vue +++ b/docs/.vitepress/theme/components/ArticleMetadata.vue @@ -5,6 +5,11 @@ 精品 +