🐞 fix(sidebar): 修改导航栏,修复链接

This commit is contained in:
focused_xy
2024-07-30 15:10:13 +08:00
parent 82bc26b36c
commit e02b326c7c
3 changed files with 7 additions and 5 deletions

View File

@@ -37,6 +37,8 @@ export function main_sidebar() {
collapsed: true, collapsed: true,
items: [ items: [
{ text: '2.编程模块', link: '/2.编程模块/2.编程模块' }, { 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) { 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!"); console.warn("the file depth is beyond the maxium depth that your sidebar can show!");
const files = fs.readdirSync(dir); const files = fs.readdirSync(dir);
const sortedFiles = files.sort(compareNumericPrefixes); const sortedFiles = files.sort(compareNumericPrefixes);
const sidebar = const sidebar =
sortedFiles.map((file) => { sortedFiles.map((file) => {
const fullPath = path.join(dir, file); const fullPath = path.join(dir, file);
const stats = fs.statSync(fullPath); const stats = fs.statSync(fullPath);

View File

@@ -1,5 +1,5 @@
# Introduction to Computer Science # 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 代码来实现它们,将为从事软件开发或其他计算领域的工作做好准备,并对计算机科学与技术中的常见主题进行了简短的介绍,包括抽象、算法、体系结构、人工智能、嵌入式开发和计算机系统。
## 你将学到什么 ## 你将学到什么

View File

@@ -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)。 请参考 [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 ### Linux Setup Tools
正在开发中 正在开发中