Skip to content

Commit 02a8b2b

Browse files
committed
upgrade to markdown-it-mathjax
1 parent 06710de commit 02a8b2b

25 files changed

+317
-50
lines changed

Diff for: README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
docs/intro.md
1+
docs/chapters/intro.md

Diff for: docs/.vitepress/config.js

+22-25
Original file line numberDiff line numberDiff line change
@@ -2,32 +2,36 @@ module.exports = {
22
title: '编程导引',
33
themeConfig: {
44
nav: [
5-
{text: "编程导引", link: '/intro'},
5+
{text: "编程导引", link: '/chapters/intro'},
6+
{text: "参考", link: '/reference/glossary'},
67
],
78

8-
sidebar: [
9-
{ text: "引言", link: "/intro" },
10-
{ text: "环境", link: '/ch01_environment' },
11-
{ text: "计算", link: '/ch02_computation' },
12-
{ text: "过程", link: '/ch03_procedure' },
13-
{ text: "编码", link: '/ch04_encoding' },
14-
{ text: "序列", link: '/ch05_sequence' },
15-
{ text: "数据", link: '/ch06_data' },
16-
{ text: "状态", link: '/ch07_state' },
17-
{ text: "引用", link: '/ch08_reference' },
18-
{ text: "闭包", link: '/ch09_closure' },
19-
{ text: "对象", link: '/ch10_object' },
20-
{ text: "并发", link: '/ch11_concurrency' },
21-
],
9+
sidebar: {
10+
"/chapters/": [
11+
{ text: "引言", link: "/chapters/intro" },
12+
{ text: "环境", link: '/chapters/ch01_environment' },
13+
{ text: "计算", link: '/chapters/ch02_computation' },
14+
{ text: "过程", link: '/chapters/ch03_procedure' },
15+
{ text: "编码", link: '/chapters/ch04_encoding' },
16+
{ text: "序列", link: '/chapters/ch05_sequence' },
17+
{ text: "数据", link: '/chapters/ch06_data' },
18+
{ text: "状态", link: '/chapters/ch07_state' },
19+
{ text: "引用", link: '/chapters/ch08_reference' },
20+
{ text: "闭包", link: '/chapters/ch09_closure' },
21+
{ text: "对象", link: '/chapters/ch10_object' },
22+
{ text: "并发", link: '/chapters/ch11_concurrency' }
23+
],
24+
"/reference/": [
25+
{ text: "概念解释", link: "/reference/glossary"}
26+
]
27+
},
2228
footer: {
2329
copyright: "CC-BY 4.0 Licensed | Copyright © 2015-present Kimmy Leo"
2430
},
2531
},
2632

2733
markdown: {
28-
config: (md) => {
29-
md.use(require('markdown-it-katex'))
30-
}
34+
math: true
3135
},
3236

3337

@@ -45,13 +49,6 @@ var _hmt = _hmt || [];
4549
s.parentNode.insertBefore(hm, s);
4650
})();
4751
`
48-
],
49-
[
50-
"link",
51-
{
52-
"rel": "stylesheet",
53-
"href": "https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.6.0/katex.min.css"
54-
}
5552
]
5653
]
5754
}

Diff for: docs/.vitepress/draft/draft.md

Whitespace-only changes.

Diff for: docs/GLOSSARY.md

-1
This file was deleted.

Diff for: docs/SUMMARY.md

-14
This file was deleted.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

Diff for: docs/ch05_sequence.md renamed to docs/chapters/ch05_sequence.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ content.length // 6
103103

104104
就像这张图片描述的:
105105

106-
![list](./res/images/cons-cells.png)
106+
![list](../res/images/cons-cells.png)
107107

108108
这种结构被称为链接列表(也叫链表,Linked List)在上世纪五十年代就已经设计用于实际的程序。链表这种结构非常的灵活,可以很轻松的在任意位置添加或者删除数据。因为并不需要内存结构上的连续,所有的位序关系都是靠前一个元素和后一个元素之间的链接关系来确定,而添加或者删除数据只要改变一下这种链接关系就可以了。
109109

Diff for: docs/ch06_data.md renamed to docs/chapters/ch06_data.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ let arith = {
8888

8989
这里我们要拿前面提到的一个例子来说事儿了。
9090

91-
![list](./res/images/cons-cells.png)
91+
![list](../res/images/cons-cells.png)
9292

9393
看这张图,去掉这个list的第一个节点,结果得到的还是一个list。同样地,在这个节点上面再加一个节点,得到的也依然还是一个list。
9494

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

Diff for: docs/intro.md renamed to docs/chapters/intro.md

File renamed without changes.

Diff for: docs/concept/README.md

-5
This file was deleted.

Diff for: docs/index.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ hero:
66
tagline: "从零开始你的计算机编程之旅"
77
actions:
88
- text: 开始阅读 →
9-
link: /intro
9+
link: /chapters/intro
1010
theme: brand
1111
# features:
1212
# - icon: 🛠️

Diff for: docs/reference/debug.md

Whitespace-only changes.

Diff for: docs/reference/glossary.md

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# 概念解释 Glossary
2+
3+
## A
4+
5+
- [安全](./safety-and-security.md)
6+
7+
## C
8+
- [测试](./testing.md)
9+
10+
## D
11+
- [Debug](./debug.md)
12+
13+
## S
14+
- [Safety, Security](./safety-and-security.md)
15+
16+
## T
17+
18+
- [Testing](./testing.md)
19+
- [调试](./debug.md)
File renamed without changes.

Diff for: docs/reference/testing.md

Whitespace-only changes.

Diff for: package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"dev": "vitepress dev docs"
55
},
66
"devDependencies": {
7-
"markdown-it-katex": "^2.0.3",
7+
"markdown-it-mathjax3": "^4.3.2",
88
"vitepress": "^1.4.1"
99
}
1010
}

0 commit comments

Comments
 (0)