Skip to content

Commit

Permalink
upgrade to markdown-it-mathjax
Browse files Browse the repository at this point in the history
  • Loading branch information
kimmywork committed Oct 24, 2024
1 parent 06710de commit 02a8b2b
Show file tree
Hide file tree
Showing 25 changed files with 317 additions and 50 deletions.
2 changes: 1 addition & 1 deletion README.md
47 changes: 22 additions & 25 deletions docs/.vitepress/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,32 +2,36 @@ module.exports = {
title: '编程导引',
themeConfig: {
nav: [
{text: "编程导引", link: '/intro'},
{text: "编程导引", link: '/chapters/intro'},
{text: "参考", link: '/reference/glossary'},
],

sidebar: [
{ text: "引言", link: "/intro" },
{ text: "环境", link: '/ch01_environment' },
{ text: "计算", link: '/ch02_computation' },
{ text: "过程", link: '/ch03_procedure' },
{ text: "编码", link: '/ch04_encoding' },
{ text: "序列", link: '/ch05_sequence' },
{ text: "数据", link: '/ch06_data' },
{ text: "状态", link: '/ch07_state' },
{ text: "引用", link: '/ch08_reference' },
{ text: "闭包", link: '/ch09_closure' },
{ text: "对象", link: '/ch10_object' },
{ text: "并发", link: '/ch11_concurrency' },
],
sidebar: {
"/chapters/": [
{ text: "引言", link: "/chapters/intro" },
{ text: "环境", link: '/chapters/ch01_environment' },
{ text: "计算", link: '/chapters/ch02_computation' },
{ text: "过程", link: '/chapters/ch03_procedure' },
{ text: "编码", link: '/chapters/ch04_encoding' },
{ text: "序列", link: '/chapters/ch05_sequence' },
{ text: "数据", link: '/chapters/ch06_data' },
{ text: "状态", link: '/chapters/ch07_state' },
{ text: "引用", link: '/chapters/ch08_reference' },
{ text: "闭包", link: '/chapters/ch09_closure' },
{ text: "对象", link: '/chapters/ch10_object' },
{ text: "并发", link: '/chapters/ch11_concurrency' }
],
"/reference/": [
{ text: "概念解释", link: "/reference/glossary"}
]
},
footer: {
copyright: "CC-BY 4.0 Licensed | Copyright © 2015-present Kimmy Leo"
},
},

markdown: {
config: (md) => {
md.use(require('markdown-it-katex'))
}
math: true
},


Expand All @@ -45,13 +49,6 @@ var _hmt = _hmt || [];
s.parentNode.insertBefore(hm, s);
})();
`
],
[
"link",
{
"rel": "stylesheet",
"href": "https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.6.0/katex.min.css"
}
]
]
}
Empty file added docs/.vitepress/draft/draft.md
Empty file.
1 change: 0 additions & 1 deletion docs/GLOSSARY.md

This file was deleted.

14 changes: 0 additions & 14 deletions docs/SUMMARY.md

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion docs/ch05_sequence.md → docs/chapters/ch05_sequence.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ content.length // 6

就像这张图片描述的:

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

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

Expand Down
2 changes: 1 addition & 1 deletion docs/ch06_data.md → docs/chapters/ch06_data.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ let arith = {

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

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

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

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
5 changes: 0 additions & 5 deletions docs/concept/README.md

This file was deleted.

2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ hero:
tagline: "从零开始你的计算机编程之旅"
actions:
- text: 开始阅读 →
link: /intro
link: /chapters/intro
theme: brand
# features:
# - icon: 🛠️
Expand Down
Empty file added docs/reference/debug.md
Empty file.
19 changes: 19 additions & 0 deletions docs/reference/glossary.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# 概念解释 Glossary

## A

- [安全](./safety-and-security.md)

## C
- [测试](./testing.md)

## D
- [Debug](./debug.md)

## S
- [Safety, Security](./safety-and-security.md)

## T

- [Testing](./testing.md)
- [调试](./debug.md)
File renamed without changes.
Empty file added docs/reference/testing.md
Empty file.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"dev": "vitepress dev docs"
},
"devDependencies": {
"markdown-it-katex": "^2.0.3",
"markdown-it-mathjax3": "^4.3.2",
"vitepress": "^1.4.1"
}
}
Loading

0 comments on commit 02a8b2b

Please sign in to comment.