diff --git a/docs/.vuepress/config/navbar.ts b/docs/.vuepress/config/navbar.ts
index 2b23acd9..9e0a2a90 100644
--- a/docs/.vuepress/config/navbar.ts
+++ b/docs/.vuepress/config/navbar.ts
@@ -25,8 +25,27 @@ export const navbar = [
},
{
text: '思维导图',
- link: "/manuscripts/note-map"
+ // link: "/manuscripts/mark-map",
+ children: [
+ {
+ text: '数据结构',
+ link: '/manuscripts/mark-map/ds-map.md'
+ },
+ {
+ text: '操作系统',
+ link: '/manuscripts/mark-map/os-map.md'
+ },
+ {
+ text: '计算机组成原理',
+ link: '/manuscripts/mark-map/ccp-map.md'
+ },
+ {
+ text: '计算机网络',
+ link: '/manuscripts/mark-map/cn-map.md'
+ }
+ ]
},
+ // http://localhost:4200/mark-map/job-poster-bytedance.html
{
text: "网站",
children: [
diff --git a/docs/.vuepress/config/sidebar.ts b/docs/.vuepress/config/sidebar.ts
index 3c6f06c1..ceb2b1a0 100644
--- a/docs/.vuepress/config/sidebar.ts
+++ b/docs/.vuepress/config/sidebar.ts
@@ -1,7 +1,7 @@
import {dsSidebar} from "../../manuscripts/ds/ds.sidebar";
import {cppSidebar} from "../../manuscripts/ccp/cpp.sidebar";
import {cnSidebar} from "../../manuscripts/cn/cn.sidebar";
-import {noteMapSidebar} from "../../manuscripts/note-map/note-map.sidebar";
+import {noteMapSidebar} from "../../manuscripts/mark-map/note-map.sidebar";
import {osSidebar} from "../../manuscripts/os/os.sidebar";
/**
@@ -12,5 +12,4 @@ export const sidebar = {
"/manuscripts/os": osSidebar,
"/manuscripts/ccp": cppSidebar,
"/manuscripts/cn": cnSidebar,
- "/manuscripts/note-map": noteMapSidebar
}
\ No newline at end of file
diff --git a/docs/.vuepress/config/theme.config.ts b/docs/.vuepress/config/theme.config.ts
index b6a75bf6..4985cd2f 100644
--- a/docs/.vuepress/config/theme.config.ts
+++ b/docs/.vuepress/config/theme.config.ts
@@ -102,6 +102,8 @@ export default {
include: true,
// 容器
container: true,
+ // mermaid
+ mermaid: true,
},
components: {
// 插件选项
diff --git a/docs/.vuepress/public/mark-map/ccp-map.html b/docs/.vuepress/public/mark-map/ccp-map.html
new file mode 100644
index 00000000..cc0ad558
--- /dev/null
+++ b/docs/.vuepress/public/mark-map/ccp-map.html
@@ -0,0 +1,40 @@
+
+
+
+
+
+
+Markmap
+
+
+
+
+
+
+
+
diff --git a/docs/.vuepress/public/mark-map/cn-map.html b/docs/.vuepress/public/mark-map/cn-map.html
new file mode 100644
index 00000000..ced8d0ed
--- /dev/null
+++ b/docs/.vuepress/public/mark-map/cn-map.html
@@ -0,0 +1,40 @@
+
+
+
+
+
+
+Markmap
+
+
+
+
+
+
+
+
diff --git a/docs/.vuepress/public/mark-map/ds-map.html b/docs/.vuepress/public/mark-map/ds-map.html
new file mode 100644
index 00000000..8aabf21a
--- /dev/null
+++ b/docs/.vuepress/public/mark-map/ds-map.html
@@ -0,0 +1,40 @@
+
+
+
+
+
+
+Markmap
+
+
+
+
+
+
+
+
diff --git a/docs/.vuepress/public/mark-map/os-map.html b/docs/.vuepress/public/mark-map/os-map.html
new file mode 100644
index 00000000..431ddaf7
--- /dev/null
+++ b/docs/.vuepress/public/mark-map/os-map.html
@@ -0,0 +1,40 @@
+
+
+
+
+
+
+Markmap
+
+
+
+
+
+
+
+
diff --git a/docs/.vuepress/public/mark-map/readme.html b/docs/.vuepress/public/mark-map/readme.html
new file mode 100644
index 00000000..2f08cd29
--- /dev/null
+++ b/docs/.vuepress/public/mark-map/readme.html
@@ -0,0 +1,40 @@
+
+
+
+
+
+
+Markmap
+
+
+
+
+
+
+
+
diff --git a/docs/changelog.md b/docs/changelog.md
index a55ad8db..0531d4b8 100644
--- a/docs/changelog.md
+++ b/docs/changelog.md
@@ -1,13 +1,7 @@
----
-icon: clock
----
-
-
# 变更记录
该文件包含 `408CSFamily` 仓库和网站所有显着更改。
-
diff --git a/docs/readme.md b/docs/readme.md
index 2f77dcf8..d87c8863 100644
--- a/docs/readme.md
+++ b/docs/readme.md
@@ -17,15 +17,15 @@ features:
details: 官方插件的基础上,抽象、封装出适合自己功能的plus插件,能够快速集成、使用在新的项目中。
- title: 反复反复
details: 通过以项目Demo示例的方式,对框架常用的功能进行Code编写和整理,提供有效且易用的代码封装。
- - title: 王道论坛
- details: 全平台都可以关注。
- link: https://github.com/zpfz/vuepress-theme-antdocs
- - title: 研招网
- link: https://github.com/zpfz/vuepress-theme-antdocs
- details: 考研最新消息。
- - title: 开源共享
- link: https://github.com/zpfz/vuepress-theme-antdocs
- details: 通过以项目Demo示例的方式,对框架常用的功能进行Code编写和整理,提供有效且易用的代码封装。
+# - title: 王道论坛
+# details: 全平台都可以关注。
+# link: https://github.com/zpfz/vuepress-theme-antdocs
+# - title: 研招网
+# link: https://github.com/zpfz/vuepress-theme-antdocs
+# details: 考研最新消息。
+# - title: 开源共享
+# link: https://github.com/zpfz/vuepress-theme-antdocs
+# details: 通过以项目Demo示例的方式,对框架常用的功能进行Code编写和整理,提供有效且易用的代码封装。
---
diff --git a/package.json b/package.json
index 1ecf8764..55e8168b 100644
--- a/package.json
+++ b/package.json
@@ -13,15 +13,19 @@
"url": "https://github.com/142vip"
},
"scripts": {
+ "preinstall": "chmod +x ./scripts/*",
"prepare": "rm -f .husky/pre-commit && husky install && npx husky add .husky/pre-commit \"./scripts/lint --fix\" && chmod +x .husky/pre-commit",
"dev": "vuepress dev docs",
- "build": "./scripts/bundle build",
+ "build": "./scripts/bundle build && npm run build:mark-map",
+ "build:mark-map": "./scripts/mark-map",
"build:proxy": "./scripts/bundle build_proxy",
"deploy:vercel": "vercel --prod",
"clean": "find . -name \"node_modules\" -type d -exec rm -rf '{}' + "
},
"scripts-info": {
+ "preinstall": "在安装依赖前分配脚本权限",
"prepare": "安装依赖预执行脚本",
+ "build:mark-map": "./scripts/mark-map",
"dev": "本地启动项目",
"clean": "快速删除本地依赖"
},
diff --git a/scripts/.exec b/scripts/.exec
index e92c8a82..7b1218e6 100755
--- a/scripts/.exec
+++ b/scripts/.exec
@@ -5,54 +5,53 @@
const {join} = require('path')
const cwd = join(__dirname, '..')
process.env.PATH = `${join(cwd, 'node_modules', '.bin')}:${process.env.PATH}`
-const {exec,exit} = require('shelljs');
+const {exec, exit} = require('shelljs');
/**
* 监听进程
* - 退出进程
*/
process.on('exit', () => {
- exit()
+ exit()
})
/**
* 执行shell指令
- * @param commands
*/
exports.execShell = async commands => {
- let runCommands=[]
- if(typeof commands ==='string'){
- runCommands.push(commands)
- }
+ let runCommands = []
+ if (typeof commands === 'string') {
+ runCommands.push(commands)
+ }
- // 批量执行
- if(Array.isArray(commands)){
- runCommands=commands
- }
+ // 批量执行
+ if (Array.isArray(commands)) {
+ runCommands = commands
+ }
- for (let index=0;index>>command(${count}):\n${command} \n<<>>command(${count}):\n${command} \n<< {
+ const filePath = path.join(directory, file);
+ const fileExtension = path.extname(file).toLowerCase();
+
+ if (fileExtension === `.${fileType.toLowerCase()}`) {
+ return filePath
+ }
+ })
+ // 过滤空
+ .filter(c => c != null)
+}
+
+
+(async () => {
+ /**
+ * 第一步: 清空站点思维导图文件存放目录
+ */
+ const delHtmlDir = `rm -rf ${path.join(markMapHtmlPath, '*')}`
+
+ /**
+ * 第二步: 将md文档转化为思维导图网页
+ */
+ const mdList = scanDirectory(markMapPath, 'md')
+ const mdToHtmlCmdStr = mdList.map(md => `markmap --no-open ${md}`).join(' && ')
+
+
+ /**
+ * 第三步: 根据文件类型将思维导图网页文件移动到站点指定目录
+ *
+ */
+ const mdHtmlByFileType = path.join(markMapPath, '*.html')
+ const moveHtmlCmdStr = `mv -f ${mdHtmlByFileType} ${markMapHtmlPath}`
+
+ await execShell([delHtmlDir, mdToHtmlCmdStr, moveHtmlCmdStr])
+
+})()
\ No newline at end of file
diff --git a/scripts/test b/scripts/test
deleted file mode 100755
index 526c405f..00000000
--- a/scripts/test
+++ /dev/null
@@ -1,35 +0,0 @@
-#!/usr/bin/env node
-
-/**
- * 脚本测试
- * 链接:https://github.com/enquirer/enquirer
- */
-// const {execShell} = require("./.exec");
-
-(async() => {
- const { AutoComplete } = require('enquirer')
-
- const prompt = new AutoComplete({
- name: 'flavor',
- message: 'Pick your favorite flavor',
- limit: 10,
- initial: 2,
- choices: [
- 'Almond',
- 'Apple',
- 'Banana',
- 'Blackberry',
- 'Blueberry',
- 'Cherry',
- 'Chocolate',
- 'Cinnamon',
- 'Coconut',
- 'Cranberry',
- 'Grape'
- ]
- })
-
- prompt.run()
- .then(answer => console.log('Answer:', answer))
- .catch(console.error)
-})()