Skip to content

Commit add6c46

Browse files
committed
update
1 parent aebc73a commit add6c46

File tree

8 files changed

+597
-517
lines changed

8 files changed

+597
-517
lines changed

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,5 @@ dist/
88
docs/.vitepress/dist/
99

1010
*.log
11+
12+
docs/.vitepress/cache

docs/.vitepress/config.js

+16-22
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,18 @@ module.exports = {
1919
{ text: "对象", link: '/ch10_object' },
2020
{ text: "并发", link: '/ch11_concurrency' },
2121
],
22+
footer: {
23+
copyright: "CC-BY 4.0 Licensed | Copyright © 2015-present Kimmy Leo"
24+
},
2225
},
2326

27+
markdown: {
28+
config: (md) => {
29+
md.use(require('markdown-it-katex'))
30+
}
31+
},
32+
33+
2434
head: [
2535
[
2636
"script",
@@ -37,27 +47,11 @@ var _hmt = _hmt || [];
3747
`
3848
],
3949
[
40-
"script",
41-
{},
42-
43-
`
44-
window.MathJax = {
45-
tex: {
46-
inlineMath: [['$', '$']]
47-
},
48-
svg: {
49-
fontCache: 'global'
50-
}
51-
};
52-
53-
(function () {
54-
var script = document.createElement('script');
55-
script.src = 'https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-svg.js';
56-
script.async = true;
57-
document.head.appendChild(script);
58-
})();
59-
setInterval(() => window.MathJax.typeset(), 700);
60-
`
61-
],
50+
"link",
51+
{
52+
"rel": "stylesheet",
53+
"href": "https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.6.0/katex.min.css"
54+
}
55+
]
6256
]
6357
}

docs/ch02_computation.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ $$
118118
当 $x, y$ 分别为 $4x+1,5x-3$的时候。你可以试着自己去展开一下这个算式:
119119

120120
$$
121-
\sigma(4x+1, 5x-3)
121+
\sigma(4x+1, 5x-3) =
122122
(4x+1)^2 + (4x+1)(5x-3)+(4x+1+5x-3)\times 5
123123
$$
124124

docs/ch03_procedure.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ description: 程序的基本控制结构有哪几种?递归和循环的区别
1313
$$
1414
|x|
1515
= abs(x) = \begin{cases}
16-
x, &x\ge0\cr
17-
-x, &x\lt0\cr
16+
x, &x\ge0 \\
17+
-x, &x\lt0
1818
\end{cases}
1919
$$
2020

@@ -59,8 +59,8 @@ function pow(x, 5) { return pow(x, 4) * x; }
5959

6060
$$
6161
pow(x, y) = \begin{cases}
62-
x, &y=1\cr
63-
pow(x, y -1)\times x, &y>1\cr
62+
x, &y=1 \\
63+
pow(x, y -1)\times x, &y>1
6464
\end{cases}
6565
$$
6666

docs/index.md

+21-12
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,24 @@
11
---
2-
home: true
3-
heroText: 编程导引
4-
tagline: Introduction to Programming
5-
actionText: 开始阅读 →
6-
actionLink: /intro
2+
layout: home
3+
hero:
4+
name: 编程导引
5+
text: Introduction to Programming
6+
tagline: "从零开始你的计算机编程之旅"
7+
actions:
8+
- text: 开始阅读 →
9+
link: /intro
10+
theme: brand
711
# features:
8-
# - title: 简洁至上
9-
# details: 以 Markdown 为中心的项目结构,以最少的配置帮助你专注于写作。
10-
# - title: Vue驱动
11-
# details: 享受 Vue + webpack 的开发体验,在 Markdown 中使用 Vue 组件,同时可以使用 Vue 来开发自定义主题。
12-
# - title: 高性能
13-
# details: VuePress 为每个页面预渲染生成静态的 HTML,同时在页面被加载的时候,将作为 SPA 运行。
14-
footer: CC-BY 4.0 Licensed | Copyright © 2015-present Kimmy Leo
12+
# - icon: 🛠️
13+
# title: Simple and minimal, always
14+
# details: Lorem ipsum...
15+
# - icon:
16+
# src: /cool-feature-icon.svg
17+
# title: Another cool feature
18+
# details: Lorem ipsum...
19+
# - icon:
20+
# dark: /dark-feature-icon.svg
21+
# light: /light-feature-icon.svg
22+
# title: Another cool feature
23+
# details: Lorem ipsum...
1524
---

docs/public/CNAME

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
i2p.kimleo.net
1+
intro.kimleo.net

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"dev": "vitepress dev docs"
55
},
66
"devDependencies": {
7-
"markdown-it": "^12.2.0",
8-
"vitepress": "^0.19.2"
7+
"markdown-it-katex": "^2.0.3",
8+
"vitepress": "1.0.0-alpha.73"
99
}
1010
}

0 commit comments

Comments
 (0)