Skip to content

Commit

Permalink
docs: 整理一些文档和底稿,调整导航
Browse files Browse the repository at this point in the history
  • Loading branch information
chu fan committed Oct 5, 2023
1 parent a66bc43 commit 4c2c73a
Show file tree
Hide file tree
Showing 48 changed files with 398 additions and 516 deletions.
76 changes: 38 additions & 38 deletions docs/.vuepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,52 11,52 @@ const PROXY_DOMAIN = process.env.PROXY_DOMAIN || false


export default defineUserConfig({
title: "计算机应试全家桶",
description: "磨刀不误砍柴工,读完硕士再打工",
base: PROXY_DOMAIN ? "/408CSFamily/" : "/",
port: 4200,
head: [
// vercel统计 相关配置
[
'script', {type: 'text/javascript', src: '/_vercel/insights/script.js'}
],
[
"link", {rel: "icon", href: "/408_favicon.ico"}
],
// 百度统计
[
'script', {}, `
title: "计算机应试全家桶",
description: "磨刀不误砍柴工,读完硕士再打工",
base: PROXY_DOMAIN ? "/408CSFamily/" : "/",
port: 4200,
head: [
// 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);
})();`
]
],
markdown: {
// todo 引入代码文件时的路径替换
importCode: {
handleImportPath: (str) => {
if (str.includes('@code')) {
return str.replace(/^@code/, path.resolve(__dirname, '../../code/'))
}
if (str.includes('~@')) {
return str.replace(/^~@/, path.resolve(__dirname, '../../'))
}
return str
},
},
// md doc formatter headerDepth
headers: {
level: [2, 3, 4]
]
],
markdown: {
// todo 引入代码文件时的路径替换
importCode: {
handleImportPath: (str) => {
if (str.includes('@code')) {
return str.replace(/^@code/, path.resolve(__dirname, '../../code/'))
}
if (str.includes('~@')) {
return str.replace(/^~@/, path.resolve(__dirname, '../../'))
}
return str
},
},
// 主题配置
...themeConfig,
// 插件配置
...pluginsConfig,
shouldPrefetch: false,
// md doc formatter headerDepth
headers: {
level: [2, 3, 4]
}
},
// 主题配置
...themeConfig,
// 插件配置
...pluginsConfig,
shouldPrefetch: false,
})

58 changes: 56 additions & 2 deletions docs/.vuepress/config/constant.config.ts
Original file line number Diff line number Diff line change
@@ -1,2 1,56 @@
export const FOOTER_HTML_INFO=`<a href="https://tongji.baidu.com/web/welcome/login" target="_blank">百度统计</a>
Copyrights © 2015-${new Date().getFullYear()} 妍荣姑娘网络工作室 <a href="https://github.com/mmdapl" target="_blank">Chu Fan</a>`
export const FOOTER_HTML_INFO = `<a href="https://tongji.baidu.com/web/welcome/login" target="_blank">百度统计</a>
Copyrights © 2015-${new Date().getFullYear()} 妍荣姑娘网络工作室 <a href="https://github.com/mmdapl" target="_blank">Chu Fan</a>`

export const NotFoundMsgList = [
"徒留我孤单在湖面成双。",
"就让回忆永远停在那里。",
"天青色等烟雨,而我在等你。",
"我用无悔,刻永世爱你的碑。",
"终有一天,我有属于我的天。",
"你想说的想给的,我全都知道。",
"我顶着大太阳,只想为你撑伞。",
"海鸟跟鱼相爱,只是一场意外。",
"那已风化千年的誓言,一切又重演。",
"下降的速度太快,来不及踏上未来。",
"我原谅不了我,就请你当作我已不在。",
"琴声何在,生死难猜,用一声去等待。",
"我戒不掉她的微笑,洋溢幸福的味道。",
"缺氧过后的爱情,粗心的眼泪事多余。",
"过往的欢乐是否褪色,想问你怎么舍得。",
"繁华如三千东流水,我只取一瓢爱了解。",
"唱反调是我的本性,出其不意是我的个性。",
"没有你在我有多难熬,没有你烦我有烦恼。",
"梦在远方,化成一缕香,随风飘散你的模样。",
"最美的不是下雨天,是曾与你躲过雨的屋檐。",
"初恋的颜色我牵着你的手经过种麦芽糖的山坡。",
"而我已经分不清,你是友情,还是错过的爱情。",
"也许时间是一种解药,也是我现在所服下的毒药。",
"能不能给我一首歌的时间,紧紧的把那拥抱变成永远。",
"如果邪恶是华丽残酷的乐章,它的终场我会亲手写上。",
"我知道共同的默契很重要,那骄傲才不会寂寞得很无聊。",
"想回到过去,试着让故事继续,至少不再让你离我而去。",
"如果我遇见你是一个悲剧,我想我这辈子注定一个人演戏。",
"请不要把分手当作你的请求,我知道坚持要走是你受伤的藉口。",
"我想就这样牵着你的手不放开,爱能不能够永远单纯没有悲哀。",
"翻着我们的照片,想念若隐若现,去年的冬天,我们笑得很甜。",
"风筝在阴天搁浅,想念还在等待救援,我拉着线复习你给的温柔。",
"整个画面是你,想你想的睡不着,我的快乐是你,想你想的都会笑。",
"酸酸的空气,嗅出我们的距离,一幕锥心的结局,像呼吸般无法停息。",
"我害怕你心碎没人帮你擦眼泪,别离开身边,拥有你我的世界才能完美。",
"有谁能比我知道,你的温柔象羽毛,秘密躺在我怀抱,只有你能听得到。",
"看着那白色的蜻蜓在空中忘了前进,还能不能重新编织,脑海中起毛球的记忆。",
"为你弹奏萧邦的夜曲,纪念我死去的爱情,而我为你隐姓埋名,在月光下弹琴。",
"我会发着呆然后忘记你,接着紧紧闭上眼,想着那一天会有人代替,让我不再想念你",
"乘着风游荡在蓝天边,一片云掉落在我面前,捏成你的形状,随风跟着我,一口一口吃掉忧愁。",
"听妈妈的话别让她受伤,想快快长大才能保护她,美丽的白发幸福总发芽,天使的魔法温暖中慈祥。",
"断了的弦再怎么连,我的感觉你已听不见,你的转变像断掉的弦,再怎么接音都不对,你的改变我能够分辨。",
"思绪不断阻挡着回忆播放,盲目的追寻仍然空空荡荡,灰蒙蒙的夜晚睡意又不知躲到哪去,一转身孤单已躺在身旁。",
"从前从前有个人爱你很久,但偏偏风渐渐把距离吹得好远,好不容易又能再多爱一天,但故事的最后你好像还是说了拜拜。",
"谁在用琵琶弹奏一曲东风破,枫叶讲故事染色结局我看透,篱笆外的古道我牵着你走过,荒烟蔓草的年头就连分手都很沉默。",
"我一路向北,离开有你的季节,你说你好累,已无法再爱上谁。风在山路吹,过往的画面全都是不对,细数惭愧,我伤你几回。",
"雨下整夜我的爱溢出就像雨水,窗台蝴蝶像诗里纷飞的美丽章节。我接着写把永远爱你写进诗的结尾,你是我唯一想要的了解。",
"缓缓飘落的枫叶像思念,为何挽回要赶在冬天来之前,爱你穿越时间,两行来自秋末的眼泪,让爱渗透了地面我要的只是你在我身边。",
"我陪你走到最后,能不能别想太多,会不会手牵着手,晚一点再到尽头,你说不该再相见只为了瞬间,谢谢你让我听见因为我在等待永远。",
"天灰灰会不会,让我忘了你是谁,累不累睡不睡,单影无人相依偎,夜越黑梦违背,有谁肯安慰,我的世界将被摧毁也许颓废也是另一种美。",
"我知道你我都没有错,只是忘了怎么退后,信誓旦旦给的承诺,全被时间扑了空。我知道我们都没有错,只是放手会比较好过,最美的爱情回忆里待续。",
]
126 changes: 61 additions & 65 deletions docs/.vuepress/config/lang.config.ts
Original file line number Diff line number Diff line change
@@ -1,83 1,79 @@
import {ThemeLocaleData} from "vuepress-theme-hope";
import {NotFoundMsgList} from "./constant.config";

/**
* 支持中文
* 参考:https://theme-hope.vuejs.press/zh/config/i18n.html
*/
const localCN: ThemeLocaleData = {
lang: "zh-CN",
navbarLocales: {
langName: "简体中文",
selectLangAriaLabel: "选择语言",
},
metaLocales: {
author: "作者",
date: "写作日期",
origin: "原创",
views: "访问量",
category: "分类",
tag: "标签",
readingTime: "阅读时间",
words: "字数",
toc: "标题大纲",
prev: "上一页",
next: "下一页",
lastUpdated: "上次编辑于",
contributors: "贡献者",
editLink: "编辑此页",
print: "打印",
},
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: "收藏",
},
blogLocales: {
article: "文章",
articleList: "文章列表",
category: "分类",
tag: "标签",
timeline: "时间轴",
timelineTitle: "昨日不在",
all: "全部",
intro: "个人介绍",
star: "收藏",
},

paginationLocales: {
prev: "上一页",
next: "下一页",
navigate: "跳转到",
action: "前往",
errorText: "请输入 1 到 $page 之前的页码!",
},
paginationLocales: {
prev: "上一页",
next: "下一页",
navigate: "跳转到",
action: "前往",
errorText: "请输入 1 到 $page 之前的页码!",
},

outlookLocales: {
themeColor: "主题色",
darkmode: "外观",
fullscreen: "全屏",
},
outlookLocales: {
themeColor: "主题色",
darkmode: "外观",
fullscreen: "全屏",
},

encryptLocales: {
iconLabel: "文章已加密",
placeholder: "输入密码",
remember: "记住密码",
errorHint: "请输入正确的密码",
},
routeLocales: {
skipToContent: "跳至主要內容",
notFoundTitle: "访问的页面不存在,嘤嘤嘤",
notFoundMsg: [
"这里什么也没有",
"我们是怎么来到这儿的?",
"这 是 四 零 四 !",
"看起来你访问了一个失效的链接",
],
back: "返回",
home: "首页",
openInNewWindow: "新窗口打开",
},
encryptLocales: {
iconLabel: "文章已加密",
placeholder: "输入密码",
remember: "记住密码",
errorHint: "请输入正确的密码",
},
routeLocales: {
skipToContent: "跳至主要內容",
notFoundTitle: "访问的页面不存在",
notFoundMsg: NotFoundMsgList,
back: "返回上一页",
home: "进入首页",
openInNewWindow: "新窗口打开",
},
}

/**
* 自定义语言,支持文案
*/
export const langConfig = {
"/": localCN
"/": localCN
}
12 changes: 7 additions & 5 deletions docs/.vuepress/config/navbar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 23,15 @@ export const navbar = [
text: "计算机网络",
link: "/manuscripts/cn"
},
{
text: "网站动态",
link: "/big-event-history"
},
{
text: '思维导图',
link: "/manuscripts/note-map"
},

{
text: "网站",
children: [
"/big-event-history",
"/changelog"
]
},
];
27 changes: 27 additions & 0 deletions docs/.vuepress/config/plugins.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 1,5 @@
import {searchProPlugin} from "vuepress-plugin-search-pro";
import {mdEnhancePlugin} from "vuepress-plugin-md-enhance";

/**
* 插件配置
Expand All @@ -20,5 21,31 @@ export default {
},
],
}),
// // md文档增强
// mdEnhancePlugin({
// // 文件导入
// include: true,
// // 容器
// container: true,
// }),
// componentsPlugin({
// // 插件选项
// components: [
// "ArtPlayer",
// "AudioPlayer",
// "Badge",
// "BiliBili",
// "CodePen",
// "PDF",
// "Replit",
// "Share",
// "SiteInfo",
// "StackBlitz",
// // "VidStack",
// "VideoPlayer",
// "XiGua",
// "YouTube",
// ],
// }),
]
}
Loading

0 comments on commit 4c2c73a

Please sign in to comment.