mirror of
https://github.com/openmlsys/openmlsys-zh.git
synced 2026-11-05 23:07:47 +08:00
Split each bilingual CONTRIBUTING file into _en.md and _zh.md variants: - CONTRIBUTING.md → CONTRIBUTING_en.md + CONTRIBUTING_zh.md - style.md → style_en.md + style_zh.md - info.md → info_en.md + info_zh.md - issue.md → issue_en.md + issue_zh.md - reference_guide.md → reference_guide_en.md + reference_guide_zh.md terminology.md kept as-is (bilingual lookup table by nature). Update README.md to link to _zh.md files, README_EN.md to _en.md files. Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
40 lines
1.2 KiB
Markdown
40 lines
1.2 KiB
Markdown
# 环境安装与编译指南
|
||
|
||
## 环境安装
|
||
|
||
机器学习系统书籍部署在GitHub是依赖于mdbook工具实现的。我们推荐使用rust的原生包管理器cargo安装mdbook。
|
||
|
||
```bash
|
||
# 安装rust工具链,获取cargo
|
||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
|
||
cargo install mdbook
|
||
```
|
||
|
||
## 编译HTML版本
|
||
|
||
在编译前先下载[openmlsys-zh](https://github.com/openmlsys/openmlsys-zh) , 所有的编译命令都在这个文件目录内执行。
|
||
|
||
```bash
|
||
git clone https://github.com/openmlsys/openmlsys-zh.git
|
||
cd openmlsys-zh
|
||
```
|
||
|
||
使用mdbook工具编译HTML。 请尽量使用build脚本进行编译,保证首页正确合并到书籍中去。
|
||
|
||
```bash
|
||
sh build_mdbook_v1.sh
|
||
sh build_mdbook_v2.sh
|
||
```
|
||
|
||
生成的html会在`.mdbook-v2/book`或者`.mdbook-v2-zh/book`下。此时我们可以使用`tools/assemble_docs_publish_tree.py`组装最终的双语发布版本,然后将其拷贝至openmlsys.github.io的docs发布。
|
||
|
||
具体工作流可以参考`.github/workflows/update_docs.yml`
|
||
|
||
## 样式规范
|
||
|
||
贡献请遵照本教程的[样式规范](style_zh.md)。
|
||
|
||
## 中英文术语对照
|
||
|
||
翻译请参照[中英文术语对照](terminology.md)。
|