Skip to content

Commit 3cbe8cf

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

2 files changed

Lines changed: 13 additions & 4 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

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)