From e02b326c7cef7c5219f0aed308d49000a3119201 Mon Sep 17 00:00:00 2001 From: focused_xy Date: Tue, 30 Jul 2024 15:10:13 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9E=20fix(sidebar):=20=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E5=AF=BC=E8=88=AA=E6=A0=8F=EF=BC=8C=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E9=93=BE=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .vitepress/sidebar.js | 6 ++++-- 2.编程模块/2.1.1Introduction.md | 2 +- 2.编程模块/2.1NekoBytes-TheMissing.md | 4 ++-- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.vitepress/sidebar.js b/.vitepress/sidebar.js index fec8ad7..63a4a1f 100644 --- a/.vitepress/sidebar.js +++ b/.vitepress/sidebar.js @@ -37,6 +37,8 @@ export function main_sidebar() { collapsed: true, items: [ { text: '2.编程模块', link: '/2.编程模块/2.编程模块' }, + { text: '2.1NekoBytes-TheMissing', link: '/2.编程模块/2.1NekoBytes-TheMissing' }, + { text: '2.1.1Introduction', link: '/2.编程模块/2.1.1Introduction' }, ] }, { @@ -548,12 +550,12 @@ function compareNumericPrefixes(a, b) { export function generateSidebarBasic(dir, excludeDir = [], maxDepth, currentDepth = 0) { - if (currentDepth >= maxDepth) + if (currentDepth >= maxDepth) console.warn("the file depth is beyond the maxium depth that your sidebar can show!"); const files = fs.readdirSync(dir); const sortedFiles = files.sort(compareNumericPrefixes); - const sidebar = + const sidebar = sortedFiles.map((file) => { const fullPath = path.join(dir, file); const stats = fs.statSync(fullPath); diff --git a/2.编程模块/2.1.1Introduction.md b/2.编程模块/2.1.1Introduction.md index 72366d8..85df015 100644 --- a/2.编程模块/2.1.1Introduction.md +++ b/2.编程模块/2.1.1Introduction.md @@ -1,5 +1,5 @@ # Introduction to Computer Science -这是 NekoBytes 计算机科学与技术协会 [NekoBytes-CS-001: Introduction to CS](2.1NekoBytes-TheMissing.md) 的教科书。它为想要通过编写计算机程序解决复杂问题的学习者奠定强大的编程基础,通过系统学习开发算法,并阅读和编写 C 代码来实现它们,将为从事软件开发或其他计算领域的工作做好准备,并对计算机科学与技术中的常见主题进行了简短的介绍,包括抽象、算法、体系结构、人工智能、嵌入式开发和计算机系统。 +这是 NekoBytes 计算机科学与技术协会 [NekoBytes-CS-001: Introduction to CS](/2.编程模块/2.1NekoBytes-TheMissing) 的教科书。它为想要通过编写计算机程序解决复杂问题的学习者奠定强大的编程基础,通过系统学习开发算法,并阅读和编写 C 代码来实现它们,将为从事软件开发或其他计算领域的工作做好准备,并对计算机科学与技术中的常见主题进行了简短的介绍,包括抽象、算法、体系结构、人工智能、嵌入式开发和计算机系统。 ## 你将学到什么 diff --git a/2.编程模块/2.1NekoBytes-TheMissing.md b/2.编程模块/2.1NekoBytes-TheMissing.md index a224aff..e310c90 100644 --- a/2.编程模块/2.1NekoBytes-TheMissing.md +++ b/2.编程模块/2.1NekoBytes-TheMissing.md @@ -47,7 +47,7 @@ ### 阅读材料 -阅读材料来自[课程教科书](2.1.1Introduction.md),可在线免费获取。教科书是可选的,在有歧义的情况下,讲座是事实的主要来源。 +阅读材料来自[课程教科书](/2.编程模块/2.1.1Introduction),可在线免费获取。教科书是可选的,在有歧义的情况下,讲座是事实的主要来源。 ### 作业 @@ -57,7 +57,7 @@ 请参考 [MIT对学术诚信的诠释](https://integrity.mit.edu/),尤其是[关于写代码的学术诚信](http://integrity.mit.edu/handbook/writing-code)。 ## 课程工具 -NekoBytes-CS-001 资源的核心来源是课程网站 [hdu-cs-wiki](https://hdu-cs.wiki/2.%E7%BC%96%E7%A8%8B%E6%A8%A1%E5%9D%97/2.%E7%BC%96%E7%A8%8B%E6%A8%A1%E5%9D%97)。该网站是你获取课程材料(讲座、作业、部分、考试)以及课程信息的首选。 +NekoBytes-CS-001 资源的核心来源是课程网站 [hdu-cs-wiki](/2.编程模块/2.编程模块)。该网站是你获取课程材料(讲座、作业、部分、考试)以及课程信息的首选。 ### Linux Setup Tools 正在开发中