File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -11,6 +11,8 @@ permissions:
1111
1212env :
1313 MDBOOK_VERSION : 0.5.1
14+ MDBOOK_TYPST_PDF_VERSION : 0.2.1
15+ TYPST_VERSION : 0.12.0
1416
1517jobs :
1618 deploy :
2931 mkdir bin
3032 curl -sSL https://github.com/rust-lang/mdBook/releases/download/v${MDBOOK_VERSION}/mdbook-v${MDBOOK_VERSION}-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=bin
3133 echo "$(pwd)/bin" >> "${GITHUB_PATH}"
34+
35+ - name : Install typst
36+ run : |
37+ curl -sSL https://github.com/typst/typst/releases/download/v${TYPST_VERSION}/typst-x86_64-unknown-linux-musl.tar.xz | tar -xJ --directory=bin --strip-components=1
38+ echo "$(pwd)/bin" >> "${GITHUB_PATH}"
39+
40+ - name : Install mdbook-typst-pdf
41+ run : |
42+ curl -sSL https://github.com/KaiserY/mdbook-typst-pdf/releases/download/v${MDBOOK_TYPST_PDF_VERSION}/mdbook-typst-pdf-v${MDBOOK_TYPST_PDF_VERSION}-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=bin
43+ echo "$(pwd)/bin" >> "${GITHUB_PATH}"
3244
3345 # 2. 编译
3446 - name : Build book
Original file line number Diff line number Diff line change @@ -25,7 +25,6 @@ custom-template = "custom-template.typ"
2525pdf = true
2626section-number = true
2727rust-book = true
28- optional = true
2928
3029[rust ]
3130edition = " 2024"
Original file line number Diff line number Diff line change 88
99本书的英文原版 HTML 格式可以在 [ https://doc.rust-lang.org/stable/book/ ] ( https://doc.rust-lang.org/stable/book/ ) 在线阅读;使用 ` rustup ` 安装的 Rust 也包含一份英文离线版,运行 ` rustup docs --book ` 即可打开。
1010
11- 本书还有一些社区 [ 翻译版本] [ translations ] 。(译者注:简体中文译本可以在 [ https://kaisery.github.io/trpl-zh-cn/ ] ( https://kaisery.github.io/trpl-zh-cn/ ) 在线阅读,PDF 版本请下载 [ Rust 程序设计语言 简体中文版.pdf] ( https://kaisery.github.io/trpl-zh-cn/Rust%20%E7%A8%8B%E5%BA%8F%E8%AE%BE%E8%AE%A1%E8%AF%AD%E8%A8%80%20%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87%E7%89%88 .pdf ) )
11+ 本书还有一些社区 [ 翻译版本] [ translations ] 。(译者注:简体中文译本可以在 [ https://rust.webtech.wiki/ ] ( https://rust.webtech.wiki/ ) 在线阅读,PDF 版本请下载 [ Rust 程序设计语言 简体中文版.pdf] (https://rust.webtech.wiki/typst-pdf/book .pdf)
1212
1313本书也有[ 由 No Starch Press 出版的纸质版和电子版] [ nsprust ] 。
1414
You can’t perform that action at this time.
0 commit comments