refactor: 文档迁移至VitePress

This commit is contained in:
ZiuChen 2023-01-09 23:36:30 +08:00
parent d83536fe07
commit f7b0d13904
50 changed files with 925 additions and 11804 deletions

3
.gitignore vendored
View File

@ -1,2 +1,3 @@
node_modules
.temp
dist
cache

View File

@ -1,4 +1,4 @@
# 基于Vuepress的个人主页
# 基于VitePress的个人主页
`Github Page` + `Gitee Page` + `Vercel`
@ -6,7 +6,7 @@
# 安装依赖
pnpm i
# 热更新
pnpm run docs:dev
pnpm run dev
# 构建
pnpm run docs:build
pnpm run build
```

80
docs/.vitepress/config.ts Normal file
View File

@ -0,0 +1,80 @@
import { defineConfig } from 'vitepress'
export default defineConfig({
title: 'ZiuChen',
description: 'Unlimited Progress.',
ignoreDeadLinks: true,
lastUpdated: true,
markdown: {
lineNumbers: true
},
themeConfig: {
logo: '/logo.png',
nav: [
{ text: '首页', link: '/' },
{
text: '我的项目',
items: [
{ text: '超级剪贴板', link: '/project/ClipboardManager/' },
{ text: '超级分词', link: '/project/SmartWordBreak/' }
]
},
{
text: '开源作品',
items: [
{ text: '个人作品', link: '/works/opensource' },
{ text: '社区贡献', link: '/works/contribution' }
]
},
{
text: '学习笔记',
items: [
{ text: 'JavaScript基础', link: '/note/JavaScript' },
{ text: 'CSS基础', link: '/note/CSS' },
{ text: 'JavaScript进阶', link: '/note/JavaScriptEnhanced' }
]
},
{
text: '个人介绍',
link: '/self/'
}
],
sidebar: [
{
text: '我的项目',
collapsible: true,
items: [
{ text: '超级剪贴板', link: '/project/ClipboardManager/' },
{ text: '超级分词', link: '/project/SmartWordBreak/' }
]
},
{
text: '开源作品',
collapsible: true,
items: [
{ text: '个人作品', link: '/works/opensource' },
{ text: '社区贡献', link: '/works/contribution' }
]
},
{
text: '学习笔记',
collapsible: true,
items: [
{ text: 'JavaScript基础', link: '/note/JavaScript' },
{ text: 'CSS基础', link: '/note/CSS' },
{ text: 'JavaScript进阶', link: '/note/JavaScriptEnhanced' }
]
}
],
socialLinks: [{ icon: 'github', link: 'https://ziuchen.github.io/' }],
editLink: {
pattern: 'https://github.com/ZiuChen/ZiuChen.github.io/edit/main/docs/:path',
text: 'Edit this page on GitHub'
},
footer: {
message: 'Released under the MIT License.',
copyright: 'Copyright © 2019-present Ziu Chen'
},
lastUpdatedText: 'Updated Date'
}
})

View File

@ -1,74 +0,0 @@
module.exports = {
title: 'ZiuChen',
description: 'Unlimited Progress.',
head: [
['link', { rel: 'icon', href: '/logo.png' }],
[
'script',
{},
/* js */ `
var _hmt = _hmt || [];
(function() {
var isDev = document.location.href.indexOf("localhost") !== -1
var isGitee = document.location.href.indexOf("gitee.io") !== -1
var hm1 = document.createElement("script");
hm1.src = "https://hm.baidu.com/hm.js?08b4ef50a9244e83e5a1bd5822442829"; // gitee
var hm2 = document.createElement("script");
hm2.src = "https://hm.baidu.com/hm.js?50bac15a1f238d1aa61f104a5fb6f5e0"; // github
var s = document.getElementsByTagName("script")[0];
if(isDev) return // 不上报
if (isGitee) s.parentNode.insertBefore(hm1, s);
else s.parentNode.insertBefore(hm2, s);
})();
</script>
`
]
],
plugins: [
'@vuepress/medium-zoom',
'@vuepress/active-header-links',
'@vuepress/plugin-back-to-top',
'@vuepress/last-updated',
{
transformer: (timestamp) => {
const d = new Date(timestamp)
return d.toLocaleDateString() + d.toLocaleTimeString()
}
}
],
themeConfig: {
nav: [
{ text: '首页', link: '/' },
{
text: '开源作品',
link: '/works/'
},
{
text: '个人介绍',
link: '/self/',
items: [
{
text: '技术栈',
link: '/self/#技术栈'
},
{
text: '获得奖项',
link: '/self/#获得奖项'
},
{
text: '相关链接',
link: '/self/#相关链接'
}
]
}
],
displayAllHeaders: true,
logo: '/logo.png',
repo: 'ZiuChen/ZiuChen.github.io',
editLinks: true,
docsBranch: 'main',
docsDir: 'docs',
lastUpdated: 'Last Updated',
search: false
}
}

View File

@ -1,10 +0,0 @@
export default ({ router }) => {
router.beforeEach((to, from, next) => {
if (typeof _hmt !== 'undefined') {
if (to.path) {
_hmt.push(['_trackPageview', to.fullPath]) // 添加埋点上报
}
}
next() // 执行路由跳转
})
}

View File

@ -1,5 +0,0 @@
.theme-container.home-page-class {
.page-edit {
display: none;
}
}

View File

@ -1,13 +0,0 @@
---
pageClass: home-page-class
---
<div align="center">
<img src="./.vuepress/public/logo.png" />
<h1>ZiuChen</h1>
<i>Infinite Progress</i>
<p class="action">
<a href="/works/">💖 开源作品 | Works</a>
<a href="/self/">😉 个人介绍 | About</a>
</p>
</div>

25
docs/index.md Normal file
View File

@ -0,0 +1,25 @@
---
layout: home
title: 主页
hero:
name: ZiuChen
text: 无限进步.
tagline: Infinite Progress...
actions:
- theme: brand
text: Get Started
link: /self/
- theme: alt
text: View on GitHub
link: https://github.com/ZiuChen
features:
- icon: 🎓
title: Electronic Information Major
details: 电子信息工程
- icon: 🎯
title: JavaScript & TypeScript
details: 自学前端 热爱技术
- icon: 👆
title: See more information
details: 访问导航栏查看更多信息
---

View File

@ -1,6 +1,4 @@
---
sidebar: auto
sidebarDepth: 2
editLink: false
---

View File

@ -1,6 +1,4 @@
---
sidebar: auto
sidebarDepth: 2
editLink: false
---

View File

@ -1,6 +1,4 @@
---
sidebar: auto
sidebarDepth: 2
editLink: false
---
@ -1455,9 +1453,9 @@ inherit(Student, Person)
- 遇到`<script>`标签则向服务器请求下载`.js`文件
<img src="JavaScriptEnhanced.assets/image-20221118222207332-16687813334481.png" alt="浏览器解析HTML过程" style="zoom:80%;" />
<img src="./JavaScriptEnhanced.assets/image-20221118222207332-16687813334481.png" alt="浏览器解析HTML过程" style="zoom:80%;" />
<img src="JavaScriptEnhanced.assets/image-20221118222311200-16687813941873.png" alt="浏览器是和如何工作的" style="zoom:80%;" />
<img src="./JavaScriptEnhanced.assets/image-20221118222311200-16687813941873.png" alt="浏览器是和如何工作的" style="zoom:80%;" />
[How browsers work](https://web.dev/howbrowserswork/)
@ -1582,7 +1580,7 @@ inherit(Student, Person)
在开发者工具的图层工具中可以看到,两个元素`.box1``.box2`都是在一个层Document下渲染的
![image-20221122103111654](JavaScriptEnhanced.assets/image-20221122103111654.png)
![image-20221122103111654](./JavaScriptEnhanced.assets/image-20221122103111654.png)
##### 案例2分层渲染
@ -1597,7 +1595,7 @@ inherit(Student, Person)
}
```
![image-20221122103256116](JavaScriptEnhanced.assets/image-20221122103256116.png)
![image-20221122103256116](./JavaScriptEnhanced.assets/image-20221122103256116.png)
##### 案例3transform 3D
@ -1615,7 +1613,7 @@ inherit(Student, Person)
}
```
![image-20221122103715428](JavaScriptEnhanced.assets/image-20221122103715428.png)
![image-20221122103715428](./JavaScriptEnhanced.assets/image-20221122103715428.png)
##### 案例4transition+transform
@ -1733,7 +1731,7 @@ JavaScript代码下载好后是如何一步步被执行的
### JavaScript V8引擎
![image-20221125090752249](JavaScriptEnhanced.assets/image-20221125090752249.png)
![image-20221125090752249](./JavaScriptEnhanced.assets/image-20221125090752249.png)
JS源代码经过解析生成抽象语法树词法分析器、语法分析器经过ignition转为字节码二进制、跨平台即可由CPU执行
@ -1753,7 +1751,7 @@ JS源代码经过解析生成抽象语法树词法分析器、语法分析
- 但是机器码实际上也会被还原为ByteCode这是因为如果后续执行函数的过程中类型发生了变化比如sum函数原来执行的是number类型后来执行变成了string类型之前优化的机器码并不能正确的处理运算就会逆向的转换成字节码
- 官方文档https://v8.dev/blog/turbofan-jit
![image-20221125094148365](JavaScriptEnhanced.assets/image-20221125094148365.png)
![image-20221125094148365](./JavaScriptEnhanced.assets/image-20221125094148365.png)
Blink 获取到源码 => 转为Stream => Scanner扫描器

View File

@ -1,11 +0,0 @@
---
sidebar: auto
sidebarDepth: 2
editLink: false
---
[JavaScript 基础](./JavaScript.md)
[CSS 基础](./CSS.md)
[JavaScript 高级教程](./JavaScriptEnhanced.md)

View File

@ -1,9 +1,3 @@
---
navbar: false
sidebar: auto
sidebarDepth: 2
---
# 使用指南
## 如何手动安装`clipboard-event-handler`
@ -28,22 +22,22 @@ sidebarDepth: 2
进入插件设置页(右上角💡按钮),打开插件数据文件所在路径:
![](../assets/gi1.png)
![](../assets/gi2.png)
![](./assets/gi1.png)
![](./assets/gi2.png)
### 3. 将监听程序拷贝到目录中
#### Windows:
![](../assets/gi3.png)
![](./assets/gi3.png)
#### Linux:
![](../assets/gi3-2.png)
![](./assets/gi3-2.png)
#### Mac:
![](../assets/gi3-3.png)
![](./assets/gi3-3.png)
### 4. 【重要】注意事项
@ -59,17 +53,17 @@ sidebarDepth: 2
sudo codesign --force --deep --sign -
```
![](../assets/sign-mac.png)
![](./assets/sign-mac.png)
然后将此目录中的`clipboard-event-handler-mac`文件拖入终端执行命令
![](../assets/sign-mac-2.png)
![](./assets/sign-mac-2.png)
**2. 授权**
*左上角🍎* -> *系统偏好设置* -> *安全性与隐私* -> *通用* -> *点击允许*
![](../assets/mac-chmod.jpg)
![](./assets/mac-chmod.jpg)
#### 监听程序不生效如何排查?
@ -102,13 +96,13 @@ sudo codesign --force --deep --sign -
右键目录,`坚果云`/`同步该文件夹`,将此文件夹加入到坚果云的同步服务中
![](./../assets/img2.png)
![](././assets/img2.png)
这样,每次剪贴板内容更新都将自动触发坚果云的同步服务,将剪贴板数据同步到云端
其他安装了坚果云的设备也将自动同步更新
![](../assets/img3.png)
![](./assets/img3.png)
### OneDrive
@ -165,8 +159,8 @@ sudo codesign --force --deep --sign -
需要注意的是,因为自定义功能按钮实现的是**携带数据跳转不同插件**,所以`redirect`后的内容并不应该是普通关键字(普通关键字仅能作为插件入口,而不能携带数据),而应该是`文本`/`图片`/`文件或文件夹`
![](../assets/gi4.png)
![](../assets/gi5.png)
![](./assets/gi4.png)
![](./assets/gi5.png)
- `id`: `String` 全局唯一 必须以`custom`开头 建议以时间戳为后缀

View File

@ -1,19 +1,13 @@
---
title: 超级剪贴板
navbar: false
---
<div align="center">
<img src="./assets/logo.png" alt="logo" />
<br></br>
<h1>超级剪贴板</h1>
<i>✨ 强大的剪贴板管理工具。</i>
</div>
<img src="./assets/logo.png" alt="logo" style="margin: 0 auto" />
[⭐ 开源代码](https://github.com/ZiuChen/ClipboardManager)
[🌎 疑难解答](./statement/README.md)
[🚀 进阶功能](./guide/README.md)
[🚚 更新日志](./log/README.md)
[🎈 插件发布页](https://yuanliao.info/d/5722/29)
<p style="text-align: center">✨ 强大的剪贴板管理工具。</p>
[⭐ 开源代码](https://github.com/ZiuChen/ClipboardManager) [🌎 疑难解答](./statement) [🚀 进阶功能](./guide) [🚚 更新日志](./log) [🎈 插件发布页](https://yuanliao.info/d/5722/29)
## 🔰 开始使用

View File

@ -1,9 +1,3 @@
---
navbar: false
sidebar: auto
sidebarDepth: 2
---
# 更新日志
## v1.4.7

View File

@ -17,7 +17,7 @@ navbar: false
`v1.4.0`版本更新中,`超级剪贴板`换用了[`clipboard-event`](https://github.com/sudhakar3697/node-clipboard-event)库监听剪贴板更新事件这种方式性能更优不需要反复读取剪贴板内容来做比较而只需要在检查到剪贴板更新事件时通知插件读取一次剪贴板即可完全解决了CPU占用高、浏览图片卡顿的问题。
然而该库包含了二进制文件这触发了uTools插件市场的安全限制而**无法上架**。所以自`v1.4.2`起,插件不再内置监听剪贴板更新事件的二进制文件,用户要使用**低占用、高性能的剪贴板监听方案**,可以自行下载并将其移动到剪贴板数据库文件所在目录,详见[如何手动安装`clipboard-event-handler`](../guide/README.md),插件会自动判断使用新的抑或是旧的方案监听剪贴板更新。同时,自`v1.4.3`起,你可以在设置页查看当前剪贴板监听程序的运行状态。
然而该库包含了二进制文件这触发了uTools插件市场的安全限制而**无法上架**。所以自`v1.4.2`起,插件不再内置监听剪贴板更新事件的二进制文件,用户要使用**低占用、高性能的剪贴板监听方案**,可以自行下载并将其移动到剪贴板数据库文件所在目录,详见[如何手动安装`clipboard-event-handler`](./guide),插件会自动判断使用新的抑或是旧的方案监听剪贴板更新。同时,自`v1.4.3`起,你可以在设置页查看当前剪贴板监听程序的运行状态。
----

View File

@ -1,17 +1,13 @@
---
title: 超级分词
navbar: false
---
<div align="center">
<img src="./assets/logo.png" alt="logo" />
<br></br>
<h1>超级分词</h1>
<i>✨ 智慧分词,快速提取文本关键词。</i>
</div>
<img src="./assets/logo.png" alt="logo" style="margin: 0 auto" />
[⭐ 插件发布页](https://yuanliao.info/d/5722/29)
[🌎 Q&A](./statement/README.md)
[🚚 更新日志](./log/README.md)
<p style="text-align: center">✨ 智慧分词,快速提取文本关键词。</p>
[⭐ 插件发布页](https://yuanliao.info/d/5722/29) [🌎 Q&A](./statement) [🚚 更新日志](./log)
## 🔰 开始使用

View File

@ -1,9 +1,3 @@
---
navbar: false
sidebar: auto
sidebarDepth: 2
---
# 更新日志
## v1.0.5

View File

Before

Width:  |  Height:  |  Size: 129 KiB

After

Width:  |  Height:  |  Size: 129 KiB

View File

@ -1,6 +1,4 @@
---
sidebar: auto
sidebarDepth: 2
editLink: false
---

View File

@ -1,89 +0,0 @@
---
sidebar: auto
sidebarDepth: 2
editLink: false
---
# 开源作品
## 个人作品
### Vue3+TypeScript后台管理系统
Vue3+TypeScript后台管理系统
[源代码](https://github.com/ZiuChen/vue3-ts-cms)
![](./img/vue3-ts-cms/3.png)
### Typein 效率工具集
Typein 是一个运行在现代浏览器上的拓展插件,它可以帮助你在保持专注的情况下,高效完成各种操作。
[源代码](https://github.com/ZiuChen/Typein) [宣传视频](https://www.bilibili.com/video/BV17F411A7FA) [Microsoft Edge Add-on Store](https://microsoftedge.microsoft.com/addons/detail/typein/hfgpceehhndaffdbemhafidaiecdhemi)
![cover](./img/Typein/cover.png)
### A-SOUL浏览器宠物
在浏览器里养一只A-Soul成员当宠物
[源代码](https://github.com/ZiuChen/A-Soul-Browser-Pet) [宣传视频](https://www.bilibili.com/video/BV1gB4y1275J)
![](./img/A-Soul-Browser-Pet/1.png)
### 北京交通大学课程平台功能增强
北京交通大学课程平台功能增强脚本,实现信息聚合,附件上传,让你高效处理课程信息。
[源代码](https://github.com/ZiuChen/NO-FLASH-Upload)
![](./img/NO-FLASH-Upload/2.png)
### 超级剪贴板
uTools插件一款强大的剪贴板管理工具
[源代码](https://github.com/ZiuChen/ClipboardManager)
[主页](../project/ClipboardManager/README.md)
![](./img/ClipboardManager/1.png)
### 超级粘贴
uTools插件将剪切板内容直接粘贴为文件
[源代码](https://github.com/ZiuChen/FileSaver-uTools)
![](./img/FileSaver-uTools/1.png)
### PopNotify
仿 Element UI 的通知卡片。
[源代码](https://github.com/ZiuChen/PopNotify)
[Demo](https://ziuchen.github.io/PopNotify/demo/Demo.html)
![](./img/PopNotify/1.png)
### UserScripts
用户脚本合集,生产力工具、效率工具、自动化脚本
[源代码](https://github.com/ZiuChen/userscript)
## 开源贡献
### 稀土掘金助手
稀土掘金助手: 腾讯云函数部署
[源代码](https://github.com/ZiuChen/juejin-helper-SCF)
### B站粉丝牌助手文档
B站粉丝牌助手文档
[源代码](https://github.com/ZiuChen/fansMedalHelperVersion)
[Demo](https://ziuchen.github.io/fansMedalHelperVersion/)

View File

@ -0,0 +1,18 @@
---
editLink: false
---
# 社区贡献
## 稀土掘金助手
稀土掘金助手: 腾讯云函数部署
[源代码](https://github.com/ZiuChen/juejin-helper-SCF)
## B站粉丝牌助手文档
B站粉丝牌助手文档
[源代码](https://github.com/ZiuChen/fansMedalHelperVersion)
[Demo](https://ziuchen.github.io/fansMedalHelperVersion/)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 842 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.9 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.5 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.5 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.5 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.5 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 169 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.5 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.5 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.5 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.5 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.5 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.5 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.5 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.5 MiB

71
docs/works/opensource.md Normal file
View File

@ -0,0 +1,71 @@
---
editLink: false
---
# 个人作品
## Vue3+TypeScript后台管理系统
Vue3+TypeScript后台管理系统
[源代码](https://github.com/ZiuChen/vue3-ts-cms)
## Typein 效率工具集
Typein 是一个运行在现代浏览器上的拓展插件,它可以帮助你在保持专注的情况下,高效完成各种操作。
[源代码](https://github.com/ZiuChen/Typein)
[宣传视频](https://www.bilibili.com/video/BV17F411A7FA)
[Microsoft Edge Add-on Store](https://microsoftedge.microsoft.com/addons/detail/typein/hfgpceehhndaffdbemhafidaiecdhemi)
## A-SOUL浏览器宠物
在浏览器里养一只A-Soul成员当宠物
[源代码](https://github.com/ZiuChen/A-Soul-Browser-Pet)
[宣传视频](https://www.bilibili.com/video/BV1gB4y1275J)
## 北京交通大学课程平台功能增强
北京交通大学课程平台功能增强脚本,实现信息聚合,附件上传,让你高效处理课程信息。
[源代码](https://github.com/ZiuChen/NO-FLASH-Upload)
## 超级剪贴板
uTools插件一款强大的剪贴板管理工具。基于Vue3构建
[源代码](https://github.com/ZiuChen/ClipboardManager)
[主页](../project/ClipboardManager/index.md)
## 超级粘贴
uTools插件将剪切板内容直接粘贴为文件。功能基于NodeJS
[源代码](https://github.com/ZiuChen/FileSaver-uTools)
## 超级分词
uTools插件前台使用Vue3+ElementPlus构建后台基于Express封装结巴分词并暴露API接口
## 超级连点器
uTools插件界面使用Vue3+AntDesign构建功能基于Worker
## PopNotify
仿 Element UI 的通知卡片。
[源代码](https://github.com/ZiuChen/PopNotify)
[Demo](https://ziuchen.github.io/PopNotify/demo/Demo.html)
## UserScripts
用户脚本合集,生产力工具、效率工具、自动化脚本
[源代码](https://github.com/ZiuChen/userscript)

View File

@ -1,14 +1,11 @@
{
"name": "ziuchen-docs",
"scripts": {
"docs:dev": "vuepress dev docs",
"docs:build": "vuepress build docs"
"dev": "vitepress dev docs",
"build": "vitepress build docs",
"preview": "vitepress preview docs"
},
"devDependencies": {
"@vuepress/plugin-active-header-links": "^1.9.7",
"@vuepress/plugin-back-to-top": "^1.9.7",
"@vuepress/plugin-medium-zoom": "^1.9.7",
"vue-template-compiler": "^2.7.8",
"vuepress": "^1.9.7"
"vitepress": "1.0.0-alpha.35",
"vue": "^3.2.45"
}
}

12215
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff