Skip to content

Commit 4e87b76

Browse files
committed
feat: add watch rebuild feature & fix typo.
1 parent 441491f commit 4e87b76

10 files changed

Lines changed: 16 additions & 13 deletions

File tree

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@
33
/target
44
docs
55
cobertura.xml
6-
.vscode
6+
.vscode
7+
docs

book/chinese.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Typikon 让您可以使用 Markdown 编写您的在线书籍。
1616

1717
### 介 绍
1818

19-
<img src="https://img.ibyte.me/w3uchi.png" alt="Typikon Image"
19+
<img src="https://img.leonding.me/w3uchi.png" alt="Typikon Image"
2020
style="float: left; margin: 0px 20px 10px 10px;height: 100px;" />
2121

2222
Typikon 的名字源自 [Typikon](https://en.wikipedia.org/wiki/Typikon) 书籍,它是一个类似于 mdbook 和 gitbook 的静态网站渲染工具,但它专注于将 Markdown 渲染成在线书籍,比其他工具更易于使用。

book/english.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Typikon lets you use markdown to write your online books.
1818

1919
### Introduce
2020

21-
<img src="https://img.ibyte.me/w3uchi.png" alt="Typikon Image"
21+
<img src="https://img.leonding.me/w3uchi.png" alt="Typikon Image"
2222
style="float: left; margin: 0px 20px 10px 10px;height: 100px;" />
2323

2424
Typikon name derived from [Typikon](https://en.wikipedia.org/wiki/Typikon) Book, a static website rendering tool similar to mdbook and gitbook, but it focuses only on rendering markdown into an online book, and is easier to use than the other tools.

book/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Typikon lets you use markdown to write your online books.
1818

1919
### Introduce
2020

21-
<img src="https://img.ibyte.me/w3uchi.png" alt="Typikon Image"
21+
<img src="https://img.leonding.me/w3uchi.png" alt="Typikon Image"
2222
style="float: left; margin: 0px 20px 10px 10px;height: 100px;" />
2323

2424
Typikon name derived from [Typikon](https://en.wikipedia.org/wiki/Typikon) Book, the a static website rendering tool similar to mdbook and gitbook, but it focuses only on rendering markdown into an online book, and is easier to use than the other tools.

book/introduce-zh.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Typikon 让您可以使用 Markdown 编写您的在线书籍。
1616

1717
### 介 绍
1818

19-
<img src="https://img.ibyte.me/w3uchi.png" alt="Typikon Image"
19+
<img src="https://img.leonding.me/w3uchi.png" alt="Typikon Image"
2020
style="float: left; margin: 0px 20px 10px 10px;height: 100px;" />
2121

2222
Typikon 的名字源自 [Typikon](https://en.wikipedia.org/wiki/Typikon) 书籍,它是一个类似于 mdbook 和 gitbook 的静态网站渲染工具,但它专注于将 Markdown 渲染成在线书籍,比其他工具更易于使用。
@@ -27,7 +27,7 @@ Typikon 的名字源自 [Typikon](https://en.wikipedia.org/wiki/Typikon) 书籍
2727
2828
---
2929

30-
###
30+
###
3131

3232
- 支持暗黑和明亮主题
3333
- 支持自定义 CSS 和 JS

book/introduce.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Typikon lets you use markdown to write your online books.
1818

1919
### Introduce
2020

21-
<img src="https://img.ibyte.me/w3uchi.png" alt="Typikon Image"
21+
<img src="https://img.leonding.me/w3uchi.png" alt="Typikon Image"
2222
style="float: left; margin: 0px 20px 10px 10px;height: 100px;" />
2323

2424
Typikon name derived from [Typikon](https://en.wikipedia.org/wiki/Typikon) Book, a static website rendering tool similar to mdbook and gitbook, but it focuses only on rendering markdown into an online book, and is easier to use than the other tools.

src/cli/commands.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ pub fn handle_serve_command(_args: &[String]) {
139139
let docs = warp::fs::dir(settings.directory.output.clone());
140140

141141
log.info(format_args!(
142-
"Starting HTTP server on port {}",
142+
"Starting HTTP server on http://localhost:{}",
143143
settings.port
144144
));
145145

@@ -172,14 +172,15 @@ pub fn handle_watch_command() {
172172
let docs = warp::fs::dir(settings.directory.output.clone());
173173

174174
log.info(format_args!(
175-
"Starting HTTP server on port {}",
175+
"Starting HTTP server on http://localhost:{}",
176176
settings.port
177177
));
178178

179179
runtime.spawn(async move {
180180
warp::serve(docs).run(([127, 0, 0, 1], settings.port)).await;
181181
});
182-
// create a channel to receive file change events
182+
183+
// create a channel to receive file change events.
183184
let (tx, rx) = channel();
184185

185186
let mut debouncer = new_debouncer(Duration::from_secs(1), tx).unwrap();
@@ -191,6 +192,7 @@ pub fn handle_watch_command() {
191192
RecursiveMode::Recursive,
192193
)
193194
.unwrap();
195+
194196
runtime.block_on(async {
195197
for res in rx {
196198
match res {

tests/html/chapter_1.1.0.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ flush privileges;
6868

6969
## 插入普通图片
7070

71-
![java](https://img.ibyte.me/470eor.jpg)
71+
![java](https://img.leonding.me/470eor.jpg)
7272

7373
## 引用示例
7474

tests/html/html_test.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ flush privileges;
100100
101101
## 插入普通图片
102102
103-
![java](https://img.ibyte.me/470eor.jpg)
103+
![java](https://img.leonding.me/470eor.jpg)
104104
105105
## 引用示例
106106

tests/html/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ <h2>列表示例</h2>
4040
</ul>
4141
<p>这是一个 <a href="">超链接测试</a> 对文本内容。</p>
4242
<h2>插入普通图片</h2>
43-
<p><img src="https://img.ibyte.me/470eor.jpg" alt="java" /></p>
43+
<p><img src="https://img.leonding.me/470eor.jpg" alt="java" /></p>
4444
<h2>引用示例</h2>
4545
<blockquote>
4646
<p>这是一个引用示例,可以包含多行文本和<strong>加粗</strong>文字。</p>

0 commit comments

Comments
 (0)