Files
openmlsys-zh/static/frontpage.html
anyin233 6c9673a659 build: migrate docs build and deploy to mdbook (#490)
* build: add mdbook support for zh chapters

Add mdBook configuration rooted at zh_chapters, generate and commit SUMMARY.md, rewrite d2l-specific directives through a Python preprocessor, refresh chapter resource symlinks from the build scripts, and ignore local build-only links and helper directories.

* feat: add raw HTML inline and frontpage layout support for mdbook preprocessor

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat: add dark mode image background for mdbook dark themes

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: add resource symlinks and repo root static fallback to mdbook build

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat: add BibTeX citation support with inline links and bibliography

Parse mlsys.bib to generate author-year inline citations linked to
per-page bibliography sections. Missing bib keys degrade gracefully
to plain text placeholders.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* refactor: switch citation display to footnote style

Use numbered superscript references [1] [2] inline with an ordered
list bibliography at page bottom. Each entry has a back-link (↩)
to the citation site.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: strip LaTeX escapes outside math mode in mdbook preprocessor

Remove \_, \%, \#, \& escapes from text outside $...$ math spans
while preserving them inside math mode for MathJax compatibility.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* style: set frontpage author grid to 6 columns and widen main content area

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: group mdbook toc by part titles

* fix: enable inline math rendering in mdbook

* build: migrate docs publishing to mdbook

Move the English root site to mdBook, keep the Chinese site as a sub-book, and update CI/deploy to publish .mdbook outputs to docs/ and docs/cn/. Also add regression coverage for placeholder skipping, publish-tree assembly, and shared resource setup.

* ci: use official pages deployment workflow

Switch the docs deployment workflow to the official GitHub Pages actions flow and verify it uses Pages action outputs for the deployment URL.

* feat: add homepage language switch links

Inject a homepage-only language switch into the mdBook frontpage wrapper so the English homepage links to the Chinese homepage and the Chinese homepage links back to the English homepage.

* fix: correct english homepage frontpage

Add an English-specific frontpage template so the default homepage no longer falls back to the Chinese frontpage, and clear homepage image backgrounds in the frontpage wrapper CSS.

* fix: align english homepage author grid

Top-align the English homepage author cards, enlarge the row gap, and normalize avatar sizing so author portraits line up consistently.

* fix: restore dark mode body image backgrounds

Apply light gray backgrounds to body images in dark themes for both English and Chinese mdBook themes while explicitly excluding homepage frontpage images.

* fix: restyle homepage language switch button

Move the homepage language switch below the GitHub star button and restyle it to match the same button family on both the English and Chinese homepages.

* fix: center homepage content container

Align the English and Chinese homepage frontpage wrapper with the main content container so homepage content is centered like normal body content.

* fix: stack english homepage footer copy

Keep the English homepage contributor and errata footer lines in normal block flow so each sentence stays on its own line instead of being laid out as author-grid columns.

* fix: widen centered homepage container

Keep the homepage frontpage wrapper centered while ensuring it uses at least 80% of the available content area, without changing normal body page layout.

* fix: widen homepage main content area

Apply a homepage-only override so mdbook-content > main uses at least 80% of the available content width while keeping normal body pages on the default layout.

* ci: use peaceiris action for mdbook

Replace manual mdBook installation in CI and Pages workflows with peaceiris/actions-mdbook@v2 and keep a regression test to ensure the action stays in use.

* fix: reduce homepage main width floor

Lower the homepage-only mdbook-content > main minimum width from 80% to 65% while leaving normal body pages unchanged.

* build: switch math rendering to mdbook-katex

Use mdbook-katex in pre-render mode for both books, pin mdBook to a compatible version, update build scripts and workflows, and replace the old MathJax regression tests with KaTeX coverage.

* Revert "build: switch math rendering to mdbook-katex"

This reverts commit b9cf38a5d1.

* build: switch math rendering from MathJax to mdbook-typst-math

* ci: deploy docs to openmlsys.github.io repo

* fix: convert pandoc tables to GFM pipe tables for mdbook

* feat: convert :eqlabel:/:eqref: to MathJax \tag/\label/\eqref

- Add process_equation_labels() to inject \tag{n}\label{name} into
  preceding $$ equations, replacing :eqlabel: directives
- Change :eqref: conversion from backtick code to $\eqref{name}$
  for clickable cross-references
- Add TeX.equationNumbers.autoNumber:"none" to MathJax config to
  prevent conflicts with manual \tag numbering
- Add tests for single-line, multi-line, and sequential numbering

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* ci: cache mdbook-typst-math binary in workflows

* feat: add LaTeX-to-Typst math converter with eqref/tag support

* feat: integrate LaTeX-to-Typst conversion into zh preprocessor

* fix: strip LaTeX escapes only outside math spans and code blocks

* fix: load references/*.bib so all citations render correctly

* fix: skip citations with no bib entry instead of rendering raw keys

* ci: remove redundant CI workflow, keep only deploy workflow

* ci: Add CI workflow for testing and building mdBook

* ci: remove concurrency settings from update_docs.yml

Removed concurrency settings from the update_docs workflow.

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 16:17:37 +00:00

481 lines
12 KiB
HTML

<head>
<style>
h1, .side-doc-outline {
display: none;
}
.document .page-content {
width: 100%;
}
h2, h3, h4 {
letter-spacing: 2px;
}
.mdl-grid {
align-items: center;
justify-content: center;
text-align: center;
padding: 150px 0 0 0;
}
h2.toc {
padding: 150px 0 0 0;
}
.header h2 {
font-size: 2rem;
padding-bottom: 35px;
}
.header p {
font-size: 1.25rem;
letter-spacing: 0px;
line-height: 1.5rempx;
padding-bottom: 10px;
}
.header .mdl-button {
margin: 0px 10px;
letter-spacing: 2px;
font-size: 16px;
margin: 1rem 1.5rem;
height: 40px;
width: 120px;
}
.author-item {
max-width: 300px;
}
.author-item h3 {
padding-top: 25px;
padding-bottom: 10px;
}
.author-item img {
border-radius: 50%;
width: 120px;
}
.authors h4 {
width: 100%;
}
.authors h2 {
padding-bottom: 18px;
}
.running-item {
max-width: 300px;
}
.running-item img {
height: 40px;
}
.running-item p {
padding: 20px;
}
.running.mdl-grid {
padding: 20px 0 0 0;
}
.logos img {
display: inline;
max-height: 70px;
max-width: 100px;
margin-left: auto;
margin-right: auto;
}
.logos {
padding-top: 1em;
padding-bottom: 2em;
}
.logos .mdl-grid {
padding: 0;
}
.features .logos .mdl-cell {
padding: 10px 0;
}
.features .mdl-cell {
padding: 0 36px;
}
.features h2, .features-2 h2 {
padding-bottom: 24px;
}
.features-2 p {
padding: 0 200px;
}
.institute.mdl-grid {
padding: 24px;
}
.institute .mdl-cell {
text-align: left;
padding: 0;
}
#logoimg {
padding-top: 0em;
padding-bottom: 2em;
width: 100%;
}
#map {
height: 400px;
width: 100%;
}
#mapimg {
width: 100%;
}
a {
font-size: normal;
}
@media (max-width: 1000px) {
.mdl-grid, h2.toc {
padding: 50px 0 0 0;
}
.header img, .features-2 img {
max-width: 300px;
}
.header .mdl-cell--1-col {
display: none;
}
.features img {
max-width: 350px;
}
.features-2 p {
padding: 0 24px;
}
.features .mdl-cell {
padding: 0 8px;
}
}
.collapsible {
background-color: #EEE;
color: black;
cursor: pointer;
padding: 6px;
width: 100%;
border: none;
text-align: left;
outline: none;
font-size: 16px;
}
.collapsible-active, .collapsible:hover {
background-color: #DDD;
}
.expansion {
padding: 3px 6px;
max-height: 0;
overflow: hidden;
transition: max-height 0.2s ease-out;
}
.cover h2 {
font-size: 34px;
margin-bottom: 0px;
padding-bottom: 20px;
}
.cover p.version {
font-size: 18px;
padding: 0 0 9px 0;
}
.cover p {
margin: 0;
padding: 20px 0 0px 0;
font-size: 20px;
}
</style>
</head>
<div class="mdl-grid header">
<div class="mdl-cell mdl-cell--3-col">
<img src="_images/logo.png" class="img-fluid" alt="">
</div>
<div class="mdl-cell mdl-cell--1-col">
</div>
<div class="mdl-cell mdl-cell--5-col mdl-cell--middle cover">
<h2 class="mdl-color-text--primary">《机器学习系统:设计和实现》</h2>
<p>做世界上第一本全面讲述机器学习系统知识的开源书籍</p>
<p><a class="github-button" href="https://github.com/openmlsys/openmlsys-zh" data-icon="octicon-star" data-size="large" data-show-count="true" aria-label="Star openmlsys/openmlsys-zh on GitHub">Star</a></p>
<!-- OPENMLSYS_LANGUAGE_SWITCH -->
</div>
</div>
<div class = "authors mdl-grid" id = "author" >
<div class = "author-group-title mdl-cell mdl-cell--12-col mdl-cell--top">
<h2>核心作者</h2>
</div>
<div class = "mdl-cell mdl-cell--3-col mdl-cell--top">
<div class="author-item">
<img src="https://avatars.githubusercontent.com/u/1136455?v=4"/>
<h3><a href="https://github.com/luomai">麦络 </a></h3>
<p>爱丁堡大学</p>
</div>
</div>
<div class = "mdl-cell mdl-cell--3-col mdl-cell--top">
<div class="author-item">
<img src="https://avatars.githubusercontent.com/u/10713581?v=4"/>
<h3><a href="https://github.com/zsdonghao">董豪</a></h3>
<p> 北京大学、鹏城实验室</p>
</div>
</div>
<div class = "mdl-cell mdl-cell--3-col mdl-cell--top">
<div class="author-item">
<img src="./_images/jinxuefeng.png"/>
<h3>金雪锋</h3>
<p> MindSpore架构师</p>
</div>
</div>
<div class = "mdl-cell mdl-cell--3-col mdl-cell--top">
<div class="author-item">
<img src="https://avatars.githubusercontent.com/u/90942796?v=4"/>
<h3><a href="https://github.com/ganzhiliang">干志良</a></h3>
<p> MindSpore架构师</p>
</div>
</div>
<div class = "author-group-title mdl-cell mdl-cell--12-col mdl-cell--top">
<h2>章节作者</h2>
</div>
<div class = "mdl-cell mdl-cell--3-col mdl-cell--top">
<div class="author-item">
<img src="https://avatars.githubusercontent.com/u/21324004?v=4"/>
<h3><a href="https://github.com/Laicheng0830">赖铖</a></h3>
<p>鹏城实验室</p>
</div>
</div>
<div class = "mdl-cell mdl-cell--3-col mdl-cell--top">
<div class="author-item">
<img src="https://avatars.githubusercontent.com/u/73918561?v=4"/>
<h3><a href="https://github.com/hanjr92">韩佳容</a></h3>
<p>鹏城实验室</p>
</div>
</div>
<div class = "mdl-cell mdl-cell--3-col mdl-cell--top">
<div class="author-item">
<img src="https://avatars.githubusercontent.com/u/31511840?v=4"/>
<h3><a href="https://github.com/future-xy">符尧</a></h3>
<p>爱丁堡大学</p>
</div>
</div>
<div class = "mdl-cell mdl-cell--3-col mdl-cell--top">
<div class="author-item">
<img src="https://avatars.githubusercontent.com/u/39682259?v=4"/>
<h3><a href="https://github.com/eedalong">袁秀龙</a></h3>
<p>清华大学</p>
</div>
</div>
<div class = "mdl-cell mdl-cell--3-col mdl-cell--top">
<div class="author-item">
<img src="https://avatars.githubusercontent.com/u/22659010?v=4"/>
<h3><a href="https://github.com/quantumiracle">丁子涵</a></h3>
<p>普林斯顿大学</p>
</div>
</div>
<div class = "mdl-cell mdl-cell--3-col mdl-cell--top">
<div class="author-item">
<img src="https://avatars.githubusercontent.com/u/25477396?v=4"/>
<h3><a href="https://github.com/Jiankai-Sun">Jiankai Sun</a></h3>
<p>Stanford University</p>
</div>
</div>
<div class = "mdl-cell mdl-cell--3-col mdl-cell--top">
<div class="author-item">
<img src="https://avatars.githubusercontent.com/u/34192321?v=4"/>
<h3><a href="https://liaopeiyuan.com/">廖培元</a></h3>
<p>Carnegie Mellon University</p>
</div>
</div>
<div class = "mdl-cell mdl-cell--3-col mdl-cell--top">
<div class="author-item">
<img src="https://avatars.githubusercontent.com/u/91313652?v=4"/>
<h3><a href="https://github.com/Went-Liang">梁文腾</a></h3>
<p>北京邮电大学</p>
</div>
</div>
<div class = "mdl-cell mdl-cell--3-col mdl-cell--top">
<div class="author-item">
<img src="https://avatars.githubusercontent.com/u/49299030?v=4"/>
<h3><a href="https://github.com/JieRen98">任杰</a></h3>
<p>爱丁堡大学</p>
</div>
</div>
<div class = "mdl-cell mdl-cell--3-col mdl-cell--top">
<div class="author-item">
<img src="./_images/wanghanchen.png"/>
<h3><a href="https://github.com/hansen7">王瀚宸</a></h3>
<p>剑桥大学</p>
</div>
</div>
<div class = "mdl-cell mdl-cell--3-col mdl-cell--top">
<div class="author-item">
<img src="https://avatars.githubusercontent.com/u/10811136?v=4"/>
<h3><a href="https://github.com/ds1231h">穆沛</a></h3>
<p>爱丁堡大学</p>
</div>
</div>
<div class = "mdl-cell mdl-cell--3-col mdl-cell--top">
<div class="author-item">
<img src="./_images/zhangqinghua.png"/>
<h3>张清华</h3>
<p>华为工程师</p>
</div>
</div>
<div class = "mdl-cell mdl-cell--3-col mdl-cell--top">
<div class="author-item">
<img src="https://avatars.githubusercontent.com/u/18185293?v=4"/>
<h3>梁志博</h3>
<p>华为工程师</p>
</div>
</div>
<div class = "mdl-cell mdl-cell--3-col mdl-cell--top">
<div class="author-item">
<img src="https://avatars.githubusercontent.com/u/20573763?v=4"/>
<h3>余坚峰</h3>
<p>华为工程师</p>
</div>
</div>
<div class = "mdl-cell mdl-cell--3-col mdl-cell--top">
<div class="author-item">
<img src="https://avatars.githubusercontent.com/u/5563661?v=4"/>
<h3>褚金锦</h3>
<p>华为工程师</p>
</div>
</div>
<div class = "mdl-cell mdl-cell--3-col mdl-cell--top">
<div class="author-item">
<img src="https://avatars.githubusercontent.com/u/68210792?v=4"/>
<h3>蔡福璧</h3>
<p>华为工程师</p>
</div>
</div>
<div class = "mdl-cell mdl-cell--3-col mdl-cell--top">
<div class="author-item">
<img src="./_images/zhangrenwei.png"/>
<h3>张任伟</h3>
<p>华为工程师</p>
</div>
</div>
<div class = "mdl-cell mdl-cell--3-col mdl-cell--top">
<div class="author-item">
<img src="https://avatars.githubusercontent.com/u/2681256?v=4"/>
<h3>刘超</h3>
<p>华为工程师</p>
</div>
</div>
<div class = "mdl-cell mdl-cell--3-col mdl-cell--top">
<div class="author-item">
<img src="https://avatars.githubusercontent.com/u/5202350?v=4"/>
<h3>陈钢</h3>
<p>华为工程师</p>
</div>
</div>
<div class = "mdl-cell mdl-cell--3-col mdl-cell--top">
<div class="author-item">
<img src="https://avatars.githubusercontent.com/u/61316635?v=4"/>
<h3>黎明奇</h3>
<p>华为工程师</p>
</div>
</div>
<div class = "mdl-cell mdl-cell--3-col mdl-cell--top">
<div class="author-item">
<img src="https://avatars.githubusercontent.com/u/36526001?v=4"/>
<h3>韩刚强</h3>
<p>华为工程师</p>
</div>
</div>
<div class = "mdl-cell mdl-cell--3-col mdl-cell--top">
<div class="author-item">
<img src="https://avatars.githubusercontent.com/u/55628940?v=4"/>
<h3>唐业辉</h3>
<p>华为工程师</p>
</div>
</div>
<div class = "mdl-cell mdl-cell--3-col mdl-cell--top">
<div class="author-item">
<img src="./_images/zhaizhiqiang.png"/>
<h3>翟智强</h3>
<p>华为工程师</p>
</div>
</div>
<div class = "mdl-cell mdl-cell--3-col mdl-cell--top">
<div class="author-item">
<img src="./_images/wutiancheng.png"/>
<h3>吴天诚</h3>
<p>华为工程师</p>
</div>
</div>
<div class = "mdl-cell mdl-cell--3-col mdl-cell--top">
<div class="author-item">
<img src="https://avatars.githubusercontent.com/u/59854698?v=4"/>
<h3>李小慧</h3>
<p>华为工程师</p>
</div>
</div>
<div class = "mdl-cell mdl-cell--3-col mdl-cell--top">
<div class="author-item">
<img src="https://avatars.githubusercontent.com/u/20376974?v=4"/>
<h3>李昊阳</h3>
<p>华为工程师</p>
</div>
</div>
<div class = "mdl-cell mdl-cell--3-col mdl-cell--top">
<div class="author-item">
<img src="https://avatars.githubusercontent.com/u/17228522?v=4"/>
<h3>谭志鹏</h3>
<p>华为工程师</p>
</div>
</div>
<div class = "mdl-cell mdl-cell--3-col mdl-cell--top">
<div class="author-item">
<img src="https://avatars.githubusercontent.com/u/105415060?v=4"/>
<h3>李姗妮</h3>
<p>华为工程师</p>
</div>
</div>
<div class = "mdl-cell mdl-cell--3-col mdl-cell--top">
<div class="author-item">
<img src="./_images/guozhijian.png"/>
<h3>郭志建</h3>
<p>华为工程师</p>
</div>
</div>
<div class = "author-group-title mdl-cell mdl-cell--12-col mdl-cell--top">
<h3> 感谢来自社区的<a href="https://github.com/openmlsys/openmlsys-zh/graphs/contributors">贡献者</a></h3>
<h3> 以及为本书提出宝贵意见的 <a href="https://github.com/openmlsys/openmlsys-zh/issues">勘误者</a></h3>
<h4><a href="https://github.com/openmlsys/openmlsys-zh">欢迎为本书贡献</a></h4>
</div>
</div>
<h2 class="toc">目录</h2>
<script>
var coll = document.getElementsByClassName("collapsible");
var i;
for (i = 0; i < coll.length; i++) {
coll[i].addEventListener("click", function() {
this.classList.toggle("collapsible-active");
var content = this.nextElementSibling;
if (content.style.maxHeight){
content.style.maxHeight = null;
} else {
content.style.maxHeight = content.scrollHeight + "px";
}
});
}
</script>
<script async defer src="https://buttons.github.io/buttons.js"></script>