Skip to content

Commit d8f7edd

Browse files
committed
fix mdbook issue for workflows
1 parent d8a2617 commit d8f7edd

4 files changed

Lines changed: 28 additions & 43 deletions

File tree

.github/workflows/online-ebook.yml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,17 @@ jobs:
4040

4141
steps:
4242
- uses: actions/checkout@v4
43-
- name: Install mdBook by Xlings
44-
run: |
45-
curl -fsSL https://d2learn.org/xlings-install.sh | bash
46-
xlings install mdbook@${MDBOOK_VERSION} --global -y
43+
#- name: Install mdBook by Xlings
44+
# run: |
45+
# curl -fsSL https://d2learn.org/xlings-install.sh | bash
46+
# xlings install mdbook@${MDBOOK_VERSION} --global -y
47+
- name: Setup mdBook
48+
uses: peaceiris/actions-mdbook@v2
49+
with:
50+
mdbook-version: '0.4.43'
51+
52+
- run: mdbook build
53+
4754
- name: Setup Pages
4855
id: pages
4956
uses: actions/configure-pages@v4

README.md

Lines changed: 7 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
# d2x-project-template
22

3-
> d2x教程类项目模板 - `Book + Video + Code + X`
3+
> d2x交互式教程项目模板 - `Book + Video + Code + X`
44
55
[![d2x](https://img.shields.io/badge/d2x-ok-green.svg)](https://github.com/d2learn/d2x)
66
[![License](https://img.shields.io/badge/license-Apache_2.0-blue.svg)](LICENSE-CODE)
77

8+
| [文档](https://d2learn.github.io/d2x-project-template) - [d2x工具](https://github.com/d2learn/d2x) - [论坛](https://forum.d2learn.org) |
9+
| --- |
10+
811
该项目提供了一个, 可以被[d2x](https://github.com/d2learn/d2x)工具识别和加载的**交互式**教程类项目结构. 开发者和教程制作者, 可以基于这个模板来设计开发自己的交互式教程项目
912

1013
## 功能特色
@@ -13,30 +16,15 @@
1316
- d2x工具可以直接识别和加载
1417
- 提供了项目依赖描述, 支持一键配置环境
1518

16-
## 快速开始
17-
18-
**方式一: 本地安装使用**
19-
20-
```
21-
xlings install d2x@latest
22-
d2x create d2hello
23-
cd d2hello
24-
d2x book
25-
```
26-
27-
**方式二: 直接使用项目模板**
28-
29-
通过 [Use this template](https://github.com/new?template_name=d2x-project-template&template_owner=d2learn) 创建新的仓库
30-
31-
> 注: 工具安装及环境配置文档 -> [详情](https://d2learn.github.io/d2x-project-template)
32-
3319
## 具体项目案例
3420

3521
| 项目 | 简介 | 备注 |
3622
| --- | --- | --- |
3723
| [d2mcpp](https://github.com/mcpp-community/d2mcpp) | 现代C++核心特性入门教程 | |
24+
| [d2ds](https://github.com/d2learn/d2ds) | 强调动手实践的数据结构学习项目 | |
3825

3926
## 其他
4027

4128
- [d2x工具](https://github.com/d2learn/d2x)
42-
- [论坛交流和反馈](https://forum.d2learn.org)
29+
- [论坛交流和反馈](https://forum.d2learn.org)
30+
- `交流群`: 167535744

book/src/chapter_0.md

Lines changed: 8 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
1-
# d2x-project-template 简介
1+
# d2x-project-template
22

3-
> d2x教程类项目模板 - `Book + Video + Code + X`
3+
> d2x交互式教程项目模板 - `Book + Video + Code + X`
44
55
[![d2x](https://img.shields.io/badge/d2x-ok-green.svg)](https://github.com/d2learn/d2x)
66
[![License](https://img.shields.io/badge/license-Apache_2.0-blue.svg)](LICENSE-CODE)
77

8+
| [文档](https://d2learn.github.io/d2x-project-template) - [d2x工具](https://github.com/d2learn/d2x) - [论坛](https://forum.d2learn.org) |
9+
| --- |
10+
811
该项目提供了一个, 可以被[d2x](https://github.com/d2learn/d2x)工具识别和加载的**交互式**教程类项目结构. 开发者和教程制作者, 可以基于这个模板来设计开发自己的交互式教程项目
912

1013
## 功能特色
@@ -13,30 +16,15 @@
1316
- d2x工具可以直接识别和加载
1417
- 提供了项目依赖描述, 支持一键配置环境
1518

16-
## 快速开始
17-
18-
**方式一: 本地安装使用**
19-
20-
```
21-
xlings install d2x@latest
22-
d2x create d2hello
23-
cd d2hello
24-
d2x book
25-
```
26-
27-
**方式二: 直接使用项目模板**
28-
29-
通过 [Use this template](https://github.com/new?template_name=d2x-project-template&template_owner=d2learn) 创建新的仓库
30-
31-
> 注: 工具安装及环境配置文档 -> [详情](https://d2learn.github.io/d2x-project-template)
32-
3319
## 具体项目案例
3420

3521
| 项目 | 简介 | 备注 |
3622
| --- | --- | --- |
3723
| [d2mcpp](https://github.com/mcpp-community/d2mcpp) | 现代C++核心特性入门教程 | |
24+
| [d2ds](https://github.com/d2learn/d2ds) | 强调动手实践的数据结构学习项目 | |
3825

3926
## 其他
4027

4128
- [d2x工具](https://github.com/d2learn/d2x)
42-
- [论坛交流和反馈](https://forum.d2learn.org)
29+
- [论坛交流和反馈](https://forum.d2learn.org)
30+
- `交流群`: 167535744

book/src/chapter_2.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,8 @@ git-repository-url = "xxxx"
124124
- 第一步: 在`book/src`目录添加章节文件, 并填充内容
125125
- 第二步: 在`book/src/SUMMARY.md`添加这个文件的目录索引
126126

127+
> 注: 更多配置细节参考 - [mdbook文档](https://rust-lang.github.io/mdBook)
128+
127129
## 三、Code: 添加新的练习代码
128130

129131
项目的练习代码集中放在了`dslings`目录中, 每当用户运行`d2x checker`命令时, 就会自动加载这些练习代码到一个检测队列中, 并跳转到当前第一个检测不同的练习代码, 等待用户去修改和完整.

0 commit comments

Comments
 (0)