Skip to content

Commit

Permalink
feat: add independent sidebar for topics
Browse files Browse the repository at this point in the history
  • Loading branch information
rockbenben committed Sep 16, 2023
1 parent 18c790a commit e902a9e
Show file tree
Hide file tree
Showing 4 changed files with 1,440 additions and 1,394 deletions.
39 changes: 17 additions & 22 deletions docs/.vuepress/navbar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,46 +3,41 @@ import { navbar } from "vuepress-theme-hope";
// 精选图标:https://theme-hope.vuejs.press/zh/guide/interface/icon.html#iconfont-%E7%B2%BE%E9%80%89%E5%9B%BE%E6%A0%87
export default navbar([
{ text: "博客", icon: "blog", link: "/blog" },
{
text: "代码",
icon: "code",
prefix: "/",
children: [
"code/Markdown",
"code/AutoHotkey",
"code/Electron",
{
text: "页面开发",
icon: "vue",
prefix: "",
children: ["web/VuePress", "web/docsify", "deploy/VPS"],
},
],
},
{
text: "应用",
icon: "app",
prefix: "/",
children: [
"apps/Applist",
{
text: "直播手册",
icon: "quote",
link: "apps/livestreaming/1_obs_basic",
text: "常用扩展",
icon: "chrome",
link: "apps/Chrome",
},
{
text: "服务/系统",
text: "服务/专题",
icon: "any",
prefix: "",
children: ["services/NAS", "windows/faq"],
children: [
{
text: "直播手册",
icon: "quote",
link: "apps/livestreaming/1_obs_basic",
},
{
text: "NAS 应用",
icon: "process",
link: "services/dockers-on-nas",
},
],
},
],
},
{
text: "生活",
icon: "emmet",
prefix: "/family/",
children: ["Diet", "Shoppinglist", "Coupon"],
children: ["Diet", "Shoppinglist", "Coupon", "baby"],
},
{
text: "工具",
Expand Down
100 changes: 55 additions & 45 deletions docs/.vuepress/sidebar.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { sidebar } from "vuepress-theme-hope";

// 精选图标:https://theme-hope.vuejs.press/zh/guide/interface/icon.html#iconfont-%E7%B2%BE%E9%80%89%E5%9B%BE%E6%A0%87
export default sidebar([
export default sidebar({
"": [
"/DailyRoutine",
"/Fitness",
// 读书笔记架构更换到 docsify,不能使用相对链接
Expand All @@ -15,9 +16,9 @@ export default sidebar([
collapsible: true,
children: [
"Applist.md",
"ChatGPT.md",
"design.md",
"AppNotes.md",
"design.md",
"ChatGPT.md",
"Chrome.md",
{
text: "直播手册",
Expand All @@ -30,69 +31,75 @@ export default sidebar([
],
},
{
text: "🌐 页面开发",
text: "🐋 Docker 服务",
icon: "",
prefix: "/web/",
prefix: "/services/",
link: "",
collapsible: true,
children: "structure",
},
{
text: "🏗️ 网站部署",
text: "🪟 系统问题",
icon: "",
prefix: "/deploy/",
prefix: "/windows/",
link: "",
collapsible: true,
children: [
"Static.md",
"CloudServices.md",
"VPS.md",
{
text: "部署工具",
icon: "emmet",
collapsible: true,
children: ["GitHub.md", "Cloudflare.md", "MySQL.md", "DNS.md"],
},
],
children: "structure",
},
{
text: "🚀 代码学习",
text: "🔡 代码编程",
icon: "",
prefix: "/code/",
prefix: "",
link: "",
collapsible: true,
children: [
"README.md",
{
text: "Basic",
icon: "emmet",
text: "页面开发",
icon: "",
prefix: "/web/",
collapsible: true,
children: "structure",
},
{
text: "网站部署",
icon: "",
prefix: "/deploy/",
collapsible: true,
children: ["Markdown.md", "Electron.md", "AutoHotkey.md", "Regex.md"],
children: [
"Static.md",
"CloudServices.md",
"VPS.md",
{
text: "部署工具",
icon: "emmet",
collapsible: true,
children: ["GitHub.md", "Cloudflare.md", "MySQL.md", "DNS.md"],
},
],
},
{
text: "FrondEnd",
icon: "app",
text: "代码学习",
icon: "",
prefix: "/code/",
collapsible: true,
children: ["Vue.md", "HTML.md", "JavaScript.md", "Python.md"],
children: [
"README.md",
{
text: "Basic",
icon: "emmet",
collapsible: true,
children: ["Markdown.md", "Electron.md", "AutoHotkey.md", "Regex.md"],
},
{
text: "FrondEnd",
icon: "app",
collapsible: true,
children: ["Vue.md", "HTML.md", "JavaScript.md", "Python.md"],
},
],
},
],
},
{
text: "🐋 Linux 服务",
icon: "",
prefix: "/services/",
link: "",
collapsible: true,
children: "structure",
},
{
text: "🪟 系统问题",
icon: "",
prefix: "/windows/",
link: "",
collapsible: true,
children: "structure",
},
{
text: "🛖 生活记录",
icon: "",
Expand All @@ -108,5 +115,8 @@ export default sidebar([
link: "/blog",
collapsible: true,
children: "structure",
},
]);
}],
// 独立功能区
"/services/dockers-on-nas/": "structure",
"/family/baby/": "structure"
});
18 changes: 9 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "learn-data",
"version": "1.2.3",
"version": "1.2.4",
"license": "MIT",
"type": "module",
"scripts": {
Expand All @@ -12,21 +12,21 @@
"lint:markdown": "markdownlint docs",
"lint:markdown-fix": "markdownlint docs --fix"
},
"packageManager": "pnpm@8.6.6",
"packageManager": "pnpm@8.7.5",
"engines": {
"node": ">=16.14.0"
},
"dependencies": {
"@vuepress/client": "2.0.0-beta.66",
"@vuepress/plugin-docsearch": "2.0.0-beta.66",
"@vuepress/plugin-google-analytics": "2.0.0-beta.66",
"@vuepress/utils": "2.0.0-beta.66",
"@vuepress/client": "2.0.0-beta.67",
"@vuepress/plugin-docsearch": "2.0.0-beta.67",
"@vuepress/plugin-google-analytics": "2.0.0-beta.67",
"@vuepress/utils": "2.0.0-beta.67",
"cpx2": "^4.2.3",
"markdownlint-cli": "^0.34.0",
"prettier": "^2.8.8",
"vue": "^3.3.4",
"vuepress": "2.0.0-beta.66",
"vuepress-plugin-search-pro": "2.0.0-beta.233",
"vuepress-theme-hope": "2.0.0-beta.233"
"vuepress": "2.0.0-beta.67",
"vuepress-plugin-search-pro": "2.0.0-beta.237",
"vuepress-theme-hope": "2.0.0-beta.237"
}
}
Loading

0 comments on commit e902a9e

Please sign in to comment.