mirror of
https://github.com/142vip/408CSFamily.git
synced 2026-04-13 18:00:58 +08:00
Merge pull request #114 from chufan443/refactor/vuepress
refactor: 站点改造,引入`@142vip/vuepress`模块,简化站点结构,删除冗余配置文件
This commit is contained in:
5
.gitignore
vendored
5
.gitignore
vendored
@@ -14,8 +14,5 @@ typings/
|
||||
.next
|
||||
.nuxt
|
||||
dist
|
||||
docs/.vuepress/.cache
|
||||
docs/.vuepress/.temp
|
||||
docs/.vuepress/dist
|
||||
.husky
|
||||
.temp
|
||||
.vercel
|
||||
|
||||
1
.npmrc
1
.npmrc
@@ -2,4 +2,3 @@
|
||||
## 锁定版本
|
||||
engine-strict = true
|
||||
shamefully-hoist=true
|
||||
registry=https://registry.npmmirror.com
|
||||
|
||||
@@ -369,7 +369,7 @@
|
||||
|
||||
<div style="text-align: center" align="center">
|
||||
<img
|
||||
src="https://api.star-history.com/svg?repos=142vip/408CSFamily&type=Date"
|
||||
src="https://api.star-history.com/svg?repos=142vip/408CSFamily,142vip/JavaScriptCollection,142vip/core-x&type=Date"
|
||||
alt="Star History"
|
||||
style="border-radius: 5px"
|
||||
>
|
||||
|
||||
@@ -1,85 +0,0 @@
|
||||
import { authorInfo, name, version } from '../../../package.json'
|
||||
|
||||
export const FOOTER_HTML_INFO = `
|
||||
<div>
|
||||
All Rights Reserved
|
||||
<a href="https://github.com/142vip" target="_blank">142vip</a> Repo.
|
||||
${name}@v${version}
|
||||
|
||||
</div>
|
||||
<div style="margin-top: 5px">
|
||||
<a href="https://beian.miit.gov.cn/#/Integrated/index" target="_blank">鄂ICP备17025193号-1 </a>
|
||||
<span style="margin: 0 5px;">|</span>
|
||||
<a href="https://tongji.baidu.com/web/welcome/login" target="_blank">百度统计</a>
|
||||
</div>
|
||||
`
|
||||
|
||||
/**
|
||||
* 版权信息
|
||||
*/
|
||||
export const copyright = `
|
||||
Copyrights © 2015-${new Date().getFullYear()} ${authorInfo.name}
|
||||
`
|
||||
|
||||
/**
|
||||
* 作者信息
|
||||
*/
|
||||
export const AUTHOR_INFO = {
|
||||
name: authorInfo.name,
|
||||
email: authorInfo.email,
|
||||
url: authorInfo.homePage,
|
||||
}
|
||||
|
||||
export const NotFoundMsgList = [
|
||||
'徒留我孤单在湖面成双。',
|
||||
'就让回忆永远停在那里。',
|
||||
'天青色等烟雨,而我在等你。',
|
||||
'我用无悔,刻永世爱你的碑。',
|
||||
'终有一天,我有属于我的天。',
|
||||
'你想说的想给的,我全都知道。',
|
||||
'我顶着大太阳,只想为你撑伞。',
|
||||
'海鸟跟鱼相爱,只是一场意外。',
|
||||
'那已风化千年的誓言,一切又重演。',
|
||||
'下降的速度太快,来不及踏上未来。',
|
||||
'我原谅不了我,就请你当作我已不在。',
|
||||
'琴声何在,生死难猜,用一声去等待。',
|
||||
'我戒不掉她的微笑,洋溢幸福的味道。',
|
||||
'缺氧过后的爱情,粗心的眼泪事多余。',
|
||||
'过往的欢乐是否褪色,想问你怎么舍得。',
|
||||
'繁华如三千东流水,我只取一瓢爱了解。',
|
||||
'唱反调是我的本性,出其不意是我的个性。',
|
||||
'没有你在我有多难熬,没有你烦我有烦恼。',
|
||||
'梦在远方,化成一缕香,随风飘散你的模样。',
|
||||
'最美的不是下雨天,是曾与你躲过雨的屋檐。',
|
||||
'初恋的颜色我牵着你的手经过种麦芽糖的山坡。',
|
||||
'而我已经分不清,你是友情,还是错过的爱情。',
|
||||
'也许时间是一种解药,也是我现在所服下的毒药。',
|
||||
'能不能给我一首歌的时间,紧紧的把那拥抱变成永远。',
|
||||
'如果邪恶是华丽残酷的乐章,它的终场我会亲手写上。',
|
||||
'我知道共同的默契很重要,那骄傲才不会寂寞得很无聊。',
|
||||
'想回到过去,试着让故事继续,至少不再让你离我而去。',
|
||||
'如果我遇见你是一个悲剧,我想我这辈子注定一个人演戏。',
|
||||
'请不要把分手当作你的请求,我知道坚持要走是你受伤的藉口。',
|
||||
'我想就这样牵着你的手不放开,爱能不能够永远单纯没有悲哀。',
|
||||
'翻着我们的照片,想念若隐若现,去年的冬天,我们笑得很甜。',
|
||||
'风筝在阴天搁浅,想念还在等待救援,我拉着线复习你给的温柔。',
|
||||
'整个画面是你,想你想的睡不着,我的快乐是你,想你想的都会笑。',
|
||||
'酸酸的空气,嗅出我们的距离,一幕锥心的结局,像呼吸般无法停息。',
|
||||
'我害怕你心碎没人帮你擦眼泪,别离开身边,拥有你我的世界才能完美。',
|
||||
'有谁能比我知道,你的温柔象羽毛,秘密躺在我怀抱,只有你能听得到。',
|
||||
'看着那白色的蜻蜓在空中忘了前进,还能不能重新编织,脑海中起毛球的记忆。',
|
||||
'为你弹奏萧邦的夜曲,纪念我死去的爱情,而我为你隐姓埋名,在月光下弹琴。',
|
||||
'我会发着呆然后忘记你,接着紧紧闭上眼,想着那一天会有人代替,让我不再想念你',
|
||||
'乘着风游荡在蓝天边,一片云掉落在我面前,捏成你的形状,随风跟着我,一口一口吃掉忧愁。',
|
||||
'听妈妈的话别让她受伤,想快快长大才能保护她,美丽的白发幸福总发芽,天使的魔法温暖中慈祥。',
|
||||
'断了的弦再怎么连,我的感觉你已听不见,你的转变像断掉的弦,再怎么接音都不对,你的改变我能够分辨。',
|
||||
'思绪不断阻挡着回忆播放,盲目的追寻仍然空空荡荡,灰蒙蒙的夜晚睡意又不知躲到哪去,一转身孤单已躺在身旁。',
|
||||
'从前从前有个人爱你很久,但偏偏风渐渐把距离吹得好远,好不容易又能再多爱一天,但故事的最后你好像还是说了拜拜。',
|
||||
'谁在用琵琶弹奏一曲东风破,枫叶讲故事染色结局我看透,篱笆外的古道我牵着你走过,荒烟蔓草的年头就连分手都很沉默。',
|
||||
'我一路向北,离开有你的季节,你说你好累,已无法再爱上谁。风在山路吹,过往的画面全都是不对,细数惭愧,我伤你几回。',
|
||||
'雨下整夜我的爱溢出就像雨水,窗台蝴蝶像诗里纷飞的美丽章节。我接着写把永远爱你写进诗的结尾,你是我唯一想要的了解。',
|
||||
'缓缓飘落的枫叶像思念,为何挽回要赶在冬天来之前,爱你穿越时间,两行来自秋末的眼泪,让爱渗透了地面我要的只是你在我身边。',
|
||||
'我陪你走到最后,能不能别想太多,会不会手牵着手,晚一点再到尽头,你说不该再相见只为了瞬间,谢谢你让我听见因为我在等待永远。',
|
||||
'天灰灰会不会,让我忘了你是谁,累不累睡不睡,单影无人相依偎,夜越黑梦违背,有谁肯安慰,我的世界将被摧毁也许颓废也是另一种美。',
|
||||
'我知道你我都没有错,只是忘了怎么退后,信誓旦旦给的承诺,全被时间扑了空。我知道我们都没有错,只是放手会比较好过,最美的爱情回忆里待续。',
|
||||
]
|
||||
@@ -1,16 +0,0 @@
|
||||
import type { HeadConfig } from '@vuepress/shared'
|
||||
|
||||
export const headers: HeadConfig[] = [
|
||||
// vercel统计 相关配置
|
||||
['script', { type: 'text/javascript', src: '/_vercel/insights/script.js' }],
|
||||
['link', { rel: 'icon', href: '/408_favicon.ico' }],
|
||||
// 百度统计
|
||||
['script', {}, `
|
||||
var _hmt = _hmt || [];
|
||||
(function() {
|
||||
var hm = document.createElement("script");
|
||||
hm.src = "https://hm.baidu.com/hm.js?3515cc46ae60747b778140f0e5e22dfe";
|
||||
var s = document.getElementsByTagName("script")[0];
|
||||
s.parentNode.insertBefore(hm, s);
|
||||
})();`],
|
||||
]
|
||||
@@ -1,104 +0,0 @@
|
||||
import type { ThemeLocaleData } from 'vuepress-theme-hope'
|
||||
import type { SearchProLocaleData } from 'vuepress-plugin-search-pro'
|
||||
import { NotFoundMsgList } from './constants'
|
||||
|
||||
/**
|
||||
* 支持中文
|
||||
* 参考:https://theme-hope.vuejs.press/zh/config/i18n.html
|
||||
*/
|
||||
const themeLocalCN: ThemeLocaleData = {
|
||||
lang: 'zh-CN',
|
||||
|
||||
navbarLocales: {
|
||||
langName: '简体中文',
|
||||
selectLangAriaLabel: '选择语言',
|
||||
},
|
||||
|
||||
metaLocales: {
|
||||
author: '作者',
|
||||
date: '写作日期',
|
||||
origin: '原创',
|
||||
views: '访问量',
|
||||
category: '分类',
|
||||
tag: '标签',
|
||||
readingTime: '阅读时间',
|
||||
words: '字数',
|
||||
toc: '此页包含',
|
||||
prev: '上一页',
|
||||
next: '下一页',
|
||||
lastUpdated: '上次编辑于',
|
||||
contributors: '贡献者',
|
||||
editLink: '编辑此页',
|
||||
print: '打印',
|
||||
},
|
||||
|
||||
blogLocales: {
|
||||
article: '文章',
|
||||
articleList: '文章列表',
|
||||
category: '分类',
|
||||
tag: '标签',
|
||||
timeline: '时间轴',
|
||||
timelineTitle: '昨日不在',
|
||||
all: '全部',
|
||||
intro: '个人介绍',
|
||||
star: '星标',
|
||||
empty: '$text 为空',
|
||||
},
|
||||
|
||||
paginationLocales: {
|
||||
prev: '上一页',
|
||||
next: '下一页',
|
||||
navigate: '跳转到',
|
||||
action: '前往',
|
||||
errorText: '请输入 1 到 $page 之前的页码!',
|
||||
},
|
||||
|
||||
outlookLocales: {
|
||||
themeColor: '主题色',
|
||||
darkmode: '外观',
|
||||
fullscreen: '全屏',
|
||||
},
|
||||
|
||||
encryptLocales: {
|
||||
iconLabel: '文章已加密',
|
||||
placeholder: '输入密码',
|
||||
remember: '记住密码',
|
||||
errorHint: '请输入正确的密码',
|
||||
},
|
||||
|
||||
routeLocales: {
|
||||
skipToContent: '跳至主要內容',
|
||||
notFoundTitle: '页面不存在',
|
||||
notFoundMsg: NotFoundMsgList,
|
||||
back: '返回上一页',
|
||||
home: '进入首页',
|
||||
},
|
||||
}
|
||||
|
||||
/**
|
||||
* 自定义语言,支持文案
|
||||
*/
|
||||
export const i18n = {
|
||||
'/': themeLocalCN,
|
||||
}
|
||||
|
||||
/**
|
||||
* 搜索框支持中文
|
||||
* 参考:https://plugin-search-pro.vuejs.press/zh/config.html#locales
|
||||
*/
|
||||
export const searchProCNLocals: SearchProLocaleData = {
|
||||
placeholder: '请输入需要搜索的关键字',
|
||||
search: '搜索文档',
|
||||
searching: '搜索中',
|
||||
cancel: '取消',
|
||||
select: '选择',
|
||||
navigate: '切换',
|
||||
exit: '关闭',
|
||||
loading: '正在努力搜索中...',
|
||||
queryHistory: '搜素文字历史',
|
||||
resultHistory: '搜索结果',
|
||||
emptyHistory: '没有搜索历史',
|
||||
emptyResult: '无法找到相关结果',
|
||||
defaultTitle: '搜索文档',
|
||||
autocomplete: '自动补齐',
|
||||
}
|
||||
@@ -1,65 +0,0 @@
|
||||
/**
|
||||
* 导航栏配置
|
||||
*/
|
||||
export const navbar = [
|
||||
{
|
||||
text: '🌐 首页',
|
||||
link: '/',
|
||||
},
|
||||
{
|
||||
text: '📙 数据结构',
|
||||
link: '/ds/',
|
||||
},
|
||||
{
|
||||
text: '📕 操作系统',
|
||||
link: '/os/',
|
||||
},
|
||||
{
|
||||
text: '📘 计算机组成原理',
|
||||
link: '/ccp/',
|
||||
},
|
||||
|
||||
{
|
||||
text: '📗 计算机网络',
|
||||
link: '/cn/',
|
||||
},
|
||||
{
|
||||
text: '🧠 思维导图',
|
||||
link: '/mark-map/ds-map.html',
|
||||
},
|
||||
{
|
||||
text: '👉 了解更多',
|
||||
children: [
|
||||
{
|
||||
text: '📄 更新日志',
|
||||
link: '/changelog.md',
|
||||
},
|
||||
{
|
||||
text: '📣 网站动态',
|
||||
link: '/big-event-history.md',
|
||||
},
|
||||
{
|
||||
text: '自媒体',
|
||||
children: [
|
||||
{
|
||||
text: '💥 公众号文章',
|
||||
link: '/wechat-list.md',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
text: '外链',
|
||||
children: [
|
||||
// {
|
||||
// text: '常用网站',
|
||||
// link: '/frequent-site-link.md'
|
||||
// },
|
||||
{
|
||||
text: '🎯 开发计划',
|
||||
link: 'https://142vip-cn.feishu.cn/share/base/view/shrcnpso8R4vCid01wmg66hFjae',
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
]
|
||||
@@ -1,33 +0,0 @@
|
||||
import { searchProPlugin } from 'vuepress-plugin-search-pro'
|
||||
// import { registerComponentsPlugin } from '@vuepress/plugin-register-components'
|
||||
// import { path } from '@vuepress/utils'
|
||||
|
||||
/**
|
||||
* 插件配置
|
||||
*/
|
||||
export default {
|
||||
plugins: [
|
||||
// 组件注册,参考:https://v2.vuepress.vuejs.org/zh/reference/plugin/register-components.html
|
||||
// registerComponentsPlugin({
|
||||
// componentsDir: path.resolve(__dirname, '../components'),
|
||||
// // components: {
|
||||
// // HelloWorld: path.resolve(__dirname, '../components/HelloWorld.vue')
|
||||
// // }
|
||||
// }),
|
||||
searchProPlugin({
|
||||
// 索引全部内容
|
||||
indexContent: true,
|
||||
// 为分类和标签添加索引
|
||||
customFields: [
|
||||
{
|
||||
getter: (page: any) => page.frontmatter.category,
|
||||
formatter: '分类:$content',
|
||||
},
|
||||
{
|
||||
getter: page => page.frontmatter.tag,
|
||||
formatter: '标签:$content',
|
||||
},
|
||||
],
|
||||
}),
|
||||
],
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
import { dsSidebar } from '../../ds/ds.sidebar'
|
||||
import { cppSidebar } from '../../ccp/cpp.sidebar'
|
||||
import { cnSidebar } from '../../cn/cn.sidebar'
|
||||
import { MarkMapSidebar } from '../../mark-map/mark-map.sidebar'
|
||||
import { osSidebar } from '../../os/os.sidebar'
|
||||
|
||||
/**
|
||||
* 侧边导航栏设置
|
||||
*/
|
||||
export const sidebar = {
|
||||
'/ds': dsSidebar,
|
||||
'/os': osSidebar,
|
||||
'/ccp': cppSidebar,
|
||||
'/cn': cnSidebar,
|
||||
'/mark-map': MarkMapSidebar,
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
---
|
||||
title: 变更记录
|
||||
permalink: /changelog.html
|
||||
headerDepth: 1
|
||||
sidebar: false
|
||||
---
|
||||
|
||||
@@ -10,7 +11,7 @@ sidebar: false
|
||||
|
||||
<!-- @include: ../CHANGELOG.md#recent-alpha -->
|
||||
|
||||
## 更多
|
||||
## 更多...
|
||||
|
||||
::: tip
|
||||
|
||||
@@ -4,7 +4,7 @@ title: 首页
|
||||
heroText: 计算机408全家桶
|
||||
tagline: 保持终身学习,读研or工作,做适合自己的选择!
|
||||
actions:
|
||||
- text: 快速开始→
|
||||
- text: 快速开始🔥
|
||||
link: /quick-start.md
|
||||
type: primary
|
||||
- text: 微信公众号
|
||||
@@ -16,16 +16,16 @@ actions:
|
||||
features:
|
||||
- title: 数据结构
|
||||
details: 链表、栈、队列是基础,树、图论是难点。查找、排序套路多,算法模型不容忽视。代码能力不必过度忧虑,伪代码未尝不可
|
||||
link: /ds
|
||||
link: /ds/
|
||||
- title: 操作系统
|
||||
details: 进程管理、内存管理重中之重,细细揣摸。存储系统、输入、输出系统等配合计组学习,效果更佳
|
||||
link: /os
|
||||
link: /os/
|
||||
- title: 计算机组成原理
|
||||
details: 难难难... 晦涩难懂,定点数、浮点数难啃需反复吭、反复嚼。花时间、花精力努力攻克,抓大放小
|
||||
link: /ccp
|
||||
link: /ccp/
|
||||
- title: 计算机网络
|
||||
details: TCP、UDP常考且实用,协议多、内容杂、层次深,配合思维导图、利用碎片化时间记忆,尤其是各层协议
|
||||
link: /cn
|
||||
link: /cn/
|
||||
- title: 多学科基础
|
||||
details: 基于计算机408考试要求分学科整理笔记,汇总各类知识点。支持精准查找、快速复习
|
||||
- title: 重难点巩固
|
||||
|
||||
@@ -3,186 +3,78 @@ export const cppSidebar = [
|
||||
text: '计算机引论',
|
||||
prefix: '计算机引论',
|
||||
children: [
|
||||
{
|
||||
text: '发展历程',
|
||||
link: '发展历程.md',
|
||||
},
|
||||
{
|
||||
text: '系统层次结构',
|
||||
link: '系统层次结构.md',
|
||||
},
|
||||
{
|
||||
text: '性能指标',
|
||||
link: '性能指标.md',
|
||||
},
|
||||
{ text: '发展历程', link: '发展历程.md' },
|
||||
{ text: '系统层次结构', link: '系统层次结构.md' },
|
||||
{ text: '性能指标', link: '性能指标.md' },
|
||||
],
|
||||
},
|
||||
{
|
||||
text: '数据的表示和运算',
|
||||
prefix: '数据的表示和运算',
|
||||
children: [
|
||||
{
|
||||
text: '数制和编码',
|
||||
link: '数制和编码.md',
|
||||
},
|
||||
{
|
||||
text: '定点数',
|
||||
link: '定点数.md',
|
||||
},
|
||||
{
|
||||
text: '浮点数',
|
||||
link: '浮点数.md',
|
||||
},
|
||||
{
|
||||
text: '算数逻辑单元',
|
||||
link: '算数逻辑单元.md',
|
||||
},
|
||||
{
|
||||
text: '一些总结',
|
||||
link: '一些总结.md',
|
||||
},
|
||||
{ text: '数制和编码', link: '数制和编码.md' },
|
||||
{ text: '定点数', link: '定点数.md' },
|
||||
{ text: '浮点数', link: '浮点数.md' },
|
||||
{ text: '算数逻辑单元', link: '算数逻辑单元.md' },
|
||||
{ text: '一些总结', link: '一些总结.md' },
|
||||
],
|
||||
},
|
||||
{
|
||||
text: '存储系统',
|
||||
prefix: '存储系统',
|
||||
children: [
|
||||
{
|
||||
text: '存储器介绍',
|
||||
link: '存储器介绍.md',
|
||||
},
|
||||
{
|
||||
text: '存储器的层次化结构',
|
||||
link: '存储器的层次化结构.md',
|
||||
},
|
||||
{
|
||||
text: '随机存储器',
|
||||
link: '随机存储器.md',
|
||||
},
|
||||
{
|
||||
text: '主存和CPU',
|
||||
link: '主存和CPU.md',
|
||||
},
|
||||
{
|
||||
text: '双端口RAM和多模块存储器',
|
||||
link: '双端口RAM和多模块存储器.md',
|
||||
},
|
||||
{
|
||||
text: '高速缓冲存储器',
|
||||
link: '高速缓冲存储器.md',
|
||||
},
|
||||
{
|
||||
text: '虚拟存储器',
|
||||
link: '虚拟存储器.md',
|
||||
},
|
||||
{
|
||||
text: '一些总结',
|
||||
link: '一些总结.md',
|
||||
},
|
||||
{ text: '存储器介绍', link: '存储器介绍.md' },
|
||||
{ text: '存储器的层次化结构', link: '存储器的层次化结构.md' },
|
||||
{ text: '随机存储器', link: '随机存储器.md' },
|
||||
{ text: '主存和CPU', link: '主存和CPU.md' },
|
||||
{ text: '双端口RAM和多模块存储器', link: '双端口RAM和多模块存储器.md' },
|
||||
{ text: '高速缓冲存储器', link: '高速缓冲存储器.md' },
|
||||
{ text: '虚拟存储器', link: '虚拟存储器.md' },
|
||||
{ text: '一些总结', link: '一些总结.md' },
|
||||
],
|
||||
},
|
||||
{
|
||||
text: '指令系统',
|
||||
prefix: '指令系统',
|
||||
children: [
|
||||
{
|
||||
text: '指令格式',
|
||||
link: '指令格式.md',
|
||||
},
|
||||
{
|
||||
text: '寻址方式',
|
||||
link: '寻址方式.md',
|
||||
},
|
||||
{
|
||||
text: '指令集',
|
||||
link: '指令集.md',
|
||||
},
|
||||
{
|
||||
text: '一些总结',
|
||||
link: '一些总结.md',
|
||||
},
|
||||
{ text: '指令格式', link: '指令格式.md' },
|
||||
{ text: '寻址方式', link: '寻址方式.md' },
|
||||
{ text: '指令集', link: '指令集.md' },
|
||||
{ text: '一些总结', link: '一些总结.md' },
|
||||
],
|
||||
},
|
||||
{
|
||||
text: '中央处理器',
|
||||
prefix: '中央处理器',
|
||||
children: [
|
||||
{
|
||||
text: 'CPU的基本介绍',
|
||||
link: 'CPU的基本介绍.md',
|
||||
},
|
||||
{
|
||||
text: '指令执行过程',
|
||||
link: '指令执行过程.md',
|
||||
},
|
||||
{
|
||||
text: '数据通路',
|
||||
link: '数据通路.md',
|
||||
},
|
||||
{
|
||||
text: '控制器',
|
||||
link: '控制器.md',
|
||||
},
|
||||
{
|
||||
text: '指令流水线',
|
||||
link: '指令流水线.md',
|
||||
},
|
||||
{
|
||||
text: '一些总结',
|
||||
link: '一些总结.md',
|
||||
},
|
||||
{ text: 'CPU的基本介绍', link: 'CPU的基本介绍.md' },
|
||||
{ text: '指令执行过程', link: '指令执行过程.md' },
|
||||
{ text: '数据通路', link: '数据通路.md' },
|
||||
{ text: '控制器', link: '控制器.md' },
|
||||
{ text: '指令流水线', link: '指令流水线.md' },
|
||||
{ text: '一些总结', link: '一些总结.md' },
|
||||
],
|
||||
},
|
||||
{
|
||||
text: '总线',
|
||||
prefix: '总线',
|
||||
children: [
|
||||
{
|
||||
text: '总线介绍',
|
||||
link: '总线介绍.md',
|
||||
},
|
||||
{
|
||||
text: '总线仲裁',
|
||||
link: '总线仲裁.md',
|
||||
},
|
||||
{
|
||||
text: '总线的操作和定时',
|
||||
link: '总线的操作和定时.md',
|
||||
},
|
||||
{
|
||||
text: '总线标准',
|
||||
link: '总线标准.md',
|
||||
},
|
||||
{
|
||||
text: '一些总结',
|
||||
link: '一些总结.md',
|
||||
},
|
||||
{ text: '总线介绍', link: '总线介绍.md' },
|
||||
{ text: '总线仲裁', link: '总线仲裁.md' },
|
||||
{ text: '总线的操作和定时', link: '总线的操作和定时.md' },
|
||||
{ text: '总线标准', link: '总线标准.md' },
|
||||
{ text: '一些总结', link: '一些总结.md' },
|
||||
],
|
||||
},
|
||||
{
|
||||
text: '输入输出系统',
|
||||
prefix: '输入输出系统',
|
||||
children: [
|
||||
{
|
||||
text: '基本概念',
|
||||
link: '基本概念.md',
|
||||
},
|
||||
{
|
||||
text: '外部设备',
|
||||
link: '外部设备.md',
|
||||
},
|
||||
{
|
||||
text: '输入输出接口',
|
||||
link: '输入输出接口.md',
|
||||
},
|
||||
{
|
||||
text: '输入输出方式',
|
||||
link: '输入输出方式.md',
|
||||
},
|
||||
{
|
||||
text: '一些总结',
|
||||
link: '一些总结.md',
|
||||
},
|
||||
{ text: '基本概念', link: '基本概念.md' },
|
||||
{ text: '外部设备', link: '外部设备.md' },
|
||||
{ text: '输入输出接口', link: '输入输出接口.md' },
|
||||
{ text: '输入输出方式', link: '输入输出方式.md' },
|
||||
{ text: '一些总结', link: '一些总结.md' },
|
||||
],
|
||||
},
|
||||
]
|
||||
|
||||
@@ -1,19 +1,62 @@
|
||||
import { hopeTheme } from 'vuepress-theme-hope'
|
||||
import { hopeTheme, navbar, sidebar } from 'vuepress-theme-hope'
|
||||
import { markdownImagePlugin } from '@vuepress/plugin-markdown-image'
|
||||
import { AUTHOR_INFO, FOOTER_HTML_INFO, copyright } from './constants'
|
||||
import { navbar } from './navbar'
|
||||
import { i18n, searchProCNLocals } from './i18n'
|
||||
import { sidebar } from './sidebar'
|
||||
import { MarkMapSidebar } from './mark-map/mark-map.sidebar'
|
||||
import { cnSidebar } from './cn/cn.sidebar'
|
||||
import { cppSidebar } from './ccp/cpp.sidebar'
|
||||
import { osSidebar } from './os/os.sidebar'
|
||||
import { dsSidebar } from './ds/ds.sidebar'
|
||||
|
||||
/**
|
||||
* 导航栏配置
|
||||
*/
|
||||
export const navbarConfig = navbar([
|
||||
{ text: '🌐 首页', link: '/' },
|
||||
{ text: '📙 数据结构', link: '/ds/' },
|
||||
{ text: '📕 操作系统', link: '/os/' },
|
||||
{ text: '📘 计算机组成原理', link: '/ccp/' },
|
||||
{ text: '📗 计算机网络', link: '/cn/' },
|
||||
{ text: '🧠 思维导图', link: '/mark-map/ds-map.html' },
|
||||
{
|
||||
text: '👉 了解更多',
|
||||
children: [
|
||||
{ text: '📄 更新日志', link: '/changelog.md' },
|
||||
{ text: '📣 网站动态', link: '/big-event-history.md' },
|
||||
{
|
||||
text: '自媒体',
|
||||
children: [
|
||||
{ text: '💥 公众号文章', link: '/wechat-list.md' },
|
||||
],
|
||||
},
|
||||
{
|
||||
text: '外链',
|
||||
children: [
|
||||
// { text: '常用网站', link: '/frequent-site-link.md' },
|
||||
{ text: '🎯 开发计划', link: 'https://142vip-cn.feishu.cn/share/base/view/shrcnCSIIgL5Tg2PUpKWwiQnr6g' },
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
])
|
||||
|
||||
/**
|
||||
* 侧边导航栏设置
|
||||
*/
|
||||
export const sidebarConfig = sidebar({
|
||||
'/ds': dsSidebar,
|
||||
'/os': osSidebar,
|
||||
'/ccp': cppSidebar,
|
||||
'/cn': cnSidebar,
|
||||
'/mark-map': MarkMapSidebar,
|
||||
})
|
||||
|
||||
/**
|
||||
* hope主题配置
|
||||
* 参考:https://theme-hope.vuejs.press/zh/config/
|
||||
*/
|
||||
|
||||
export default {
|
||||
export const themeConfig = {
|
||||
theme: hopeTheme({
|
||||
// locales: langConfig,
|
||||
locales: i18n,
|
||||
// locales: i18n,
|
||||
// 在深色模式和浅色模式之间切换
|
||||
darkmode: 'toggle',
|
||||
// 支持全屏
|
||||
@@ -22,18 +65,18 @@ export default {
|
||||
// pure: true,
|
||||
print: false, // 打印按钮
|
||||
hostname: 'https://408.142vip.cn',
|
||||
author: AUTHOR_INFO,
|
||||
// author: AUTHOR_INFO,
|
||||
favicon: '/408_favicon.ico',
|
||||
logo: '/408_logo.png',
|
||||
logoDark: '/408_logo.png',
|
||||
navbar,
|
||||
navbar: navbarConfig,
|
||||
// 导航栏布局
|
||||
navbarLayout: {
|
||||
start: ['Brand'],
|
||||
center: ['Links'],
|
||||
end: ['Language', 'Outlook', 'Repo', 'Search'],
|
||||
},
|
||||
sidebar,
|
||||
sidebar: sidebarConfig,
|
||||
|
||||
// 主题布局选项
|
||||
repo: 'https://github.com/142vip/408CSFamily',
|
||||
@@ -54,9 +97,9 @@ export default {
|
||||
// },
|
||||
// 设置页脚
|
||||
displayFooter: true,
|
||||
footer: FOOTER_HTML_INFO,
|
||||
// footer: FOOTER_HTML_INFO,
|
||||
// copyright: false,
|
||||
copyright,
|
||||
// copyright,
|
||||
// 主题色选择器
|
||||
themeColor: true,
|
||||
// 是否显示外部链接图标
|
||||
@@ -130,12 +173,12 @@ export default {
|
||||
'XiGua',
|
||||
],
|
||||
},
|
||||
searchPro: {
|
||||
// 参考:https://plugin-search-pro.vuejs.press/zh/config.html#locales
|
||||
locales: {
|
||||
'/': searchProCNLocals,
|
||||
},
|
||||
},
|
||||
// searchPro: {
|
||||
// // 参考:https://plugin-search-pro.vuejs.press/zh/config.html#locales
|
||||
// locales: {
|
||||
// '/': searchProCNLocals,
|
||||
// },
|
||||
// },
|
||||
// 参考:https://theme-hope.vuejs.press/zh/config/plugins/others.html#markdowntab
|
||||
markdownTab: true,
|
||||
nprogress: true,
|
||||
21
package.json
21
package.json
@@ -31,27 +31,20 @@
|
||||
"devDependencies": {
|
||||
"@142vip/eslint-config": "^0.0.1-alpha.2",
|
||||
"@142vip/fairy-cli": "^0.0.3-alpha.11",
|
||||
"@142vip/utils": "^0.0.1-alpha.5",
|
||||
"@142vip/utils": "^0.0.1-alpha.7",
|
||||
"@142vip/vuepress": "^0.0.1-alpha.5",
|
||||
"@vue/repl": "^4.3.1",
|
||||
"@vuepress/bundler-vite": "2.0.0-rc.17",
|
||||
"@vuepress/plugin-feed": "2.0.0-rc.3",
|
||||
"@vuepress/plugin-markdown-image": "2.0.0-rc.30",
|
||||
"@vuepress/plugin-markdown-tab": "2.0.0-rc.47",
|
||||
"@vuepress/plugin-redirect": "2.0.0-rc.8",
|
||||
"dashjs": "^4.7.4",
|
||||
"hls.js": "^1.5.13",
|
||||
"@vuepress/bundler-vite": "^2.0.0-rc.17",
|
||||
"markmap-cli": "^0.15.8",
|
||||
"mermaid": "^10.9.1",
|
||||
"only-allow": "^1.2.1",
|
||||
"reveal.js": "^5.1.0",
|
||||
"sass-embedded": "^1.79.3",
|
||||
"sass-embedded": "^1.79.5",
|
||||
"typescript": "^5.5.4",
|
||||
"vercel": "^32.7.2",
|
||||
"vidstack": "^1.11.30",
|
||||
"vue": "^3.5.8",
|
||||
"vuepress": "2.0.0-rc.17",
|
||||
"vuepress-plugin-search-pro": "2.0.0-rc.57",
|
||||
"vuepress-theme-hope": "2.0.0-rc.56",
|
||||
"vuepress": "^2.0.0-rc.17",
|
||||
"vuepress-plugin-search-pro": "^2.0.0-rc.57",
|
||||
"vuepress-theme-hope": "^2.0.0-rc.58",
|
||||
"xmind-embed-viewer": "^1.2.0"
|
||||
}
|
||||
}
|
||||
|
||||
2301
pnpm-lock.yaml
generated
2301
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@@ -1,7 +0,0 @@
|
||||
import { defineClientConfig } from '@vuepress/client'
|
||||
|
||||
export default defineClientConfig({
|
||||
enhance() {},
|
||||
setup() {},
|
||||
rootComponents: [],
|
||||
})
|
||||
@@ -1,22 +1,22 @@
|
||||
import { fileURLToPath } from 'node:url'
|
||||
import process from 'node:process'
|
||||
import { defineUserConfig } from '@vuepress/cli'
|
||||
import { path } from '@vuepress/utils'
|
||||
import viteBundler from '@vuepress/bundler-vite'
|
||||
import { name } from './package.json'
|
||||
import themeConfig from './docs/.vuepress/theme/theme'
|
||||
import { headers } from './docs/.vuepress/theme/headers'
|
||||
|
||||
const __dirname = path.dirname(fileURLToPath(import.meta.url))
|
||||
|
||||
/**
|
||||
* 用于区分base路径,是否nginx代理
|
||||
*/
|
||||
function getSiteBase(): '/' | `/${string}/` {
|
||||
// 用于区分base路径,是否nginx代理
|
||||
const needProxy = process.env.NEED_PROXY || false
|
||||
return needProxy ? `/${name}/` : '/'
|
||||
}
|
||||
import {
|
||||
OPEN_SOURCE_ADDRESS,
|
||||
OPEN_SOURCE_AUTHOR,
|
||||
getDocSiteBase,
|
||||
} from '@142vip/utils'
|
||||
import {
|
||||
FamilyHeaders,
|
||||
getCopyRightText,
|
||||
getFooterHtml,
|
||||
getThemeConfig,
|
||||
getViteBundler,
|
||||
} from '@142vip/vuepress'
|
||||
import { hopeTheme } from 'vuepress-theme-hope'
|
||||
import pkg from './package.json'
|
||||
import { navbarConfig, sidebarConfig } from './docs/theme.config'
|
||||
|
||||
/**
|
||||
* 用户自定义配置
|
||||
@@ -24,17 +24,17 @@ function getSiteBase(): '/' | `/${string}/` {
|
||||
* - 环境变量中的PROXY_DOMAIN字段,用于区分是否nginx代理
|
||||
*/
|
||||
export default defineUserConfig({
|
||||
base: getDocSiteBase(pkg.name),
|
||||
title: '计算机408全家桶',
|
||||
description: '磨刀不误砍柴工,读完硕士再打工',
|
||||
// 用于区分base路径,是否nginx代理
|
||||
base: getSiteBase(),
|
||||
port: 4200,
|
||||
source: '',
|
||||
head: headers,
|
||||
head: FamilyHeaders,
|
||||
markdown: {
|
||||
// todo 引入代码文件时的路径替换
|
||||
importCode: {
|
||||
handleImportPath: (str) => {
|
||||
const __dirname = path.dirname(fileURLToPath(import.meta.url))
|
||||
if (str.includes('@code')) {
|
||||
return str.replace(/^@code/, path.resolve(__dirname, '../../code/'))
|
||||
}
|
||||
@@ -47,22 +47,58 @@ export default defineUserConfig({
|
||||
return str
|
||||
},
|
||||
},
|
||||
// md doc formatter headerDepth
|
||||
headers: {
|
||||
level: [2, 3, 4],
|
||||
},
|
||||
},
|
||||
// 主题配置
|
||||
...themeConfig,
|
||||
// 插件配置
|
||||
// ...pluginsConfig,
|
||||
bundler: viteBundler({
|
||||
viteOptions: {
|
||||
build: {
|
||||
chunkSizeWarningLimit: 4096,
|
||||
theme: hopeTheme({
|
||||
...getThemeConfig({
|
||||
// 导航栏
|
||||
navbar: navbarConfig,
|
||||
// 侧边栏
|
||||
sidebar: sidebarConfig,
|
||||
navbarLayout: {
|
||||
start: ['Brand'],
|
||||
center: ['Links'],
|
||||
end: ['Language', 'Outlook', 'Repo', 'Search'],
|
||||
},
|
||||
},
|
||||
vuePluginOptions: {},
|
||||
favicon: '/408_favicon.ico',
|
||||
logo: '/408_logo.png',
|
||||
logoDark: '/408_logo.png',
|
||||
hostname: 'https://408.142vip.cn',
|
||||
// 页脚
|
||||
footer: getFooterHtml({
|
||||
name: pkg.name,
|
||||
version: pkg.version,
|
||||
}),
|
||||
// 版权
|
||||
copyright: getCopyRightText(OPEN_SOURCE_AUTHOR.name),
|
||||
// 仓库
|
||||
repo: '142vip/408CSFamily',
|
||||
repoLabel: 'GitHub',
|
||||
|
||||
// 作者信息
|
||||
author: OPEN_SOURCE_AUTHOR,
|
||||
|
||||
// 文档路径,开启编辑功能
|
||||
docsDir: 'docs',
|
||||
docsBranch: 'next',
|
||||
// 主题布局选项
|
||||
docsRepo: OPEN_SOURCE_ADDRESS.GITHUB_REPO_408,
|
||||
|
||||
// 插件
|
||||
plugins: {
|
||||
// 水印
|
||||
watermark: {
|
||||
enabled: false,
|
||||
watermarkOptions: {
|
||||
content: OPEN_SOURCE_AUTHOR.name,
|
||||
},
|
||||
},
|
||||
},
|
||||
}),
|
||||
}),
|
||||
bundler: viteBundler(getViteBundler()),
|
||||
shouldPrefetch: false,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user