feat(docs): add PDF and EPUB generation support (#318)

- Add mdbook-pdf and mdbook-epub output config with cover image in book.toml
- Update README build section with install commands and output paths
- Add .DS_Store to .gitignore

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Dongliang Mu
2026-04-14 21:59:28 +08:00
committed by GitHub
parent 3b569c4074
commit 5575024953
3 changed files with 16 additions and 3 deletions

2
.gitignore vendored
View File

@@ -1,3 +1,5 @@
/book/
CLAUDE.md
.DS_Store

View File

@@ -27,12 +27,12 @@
## 使用 mdBook 构建
仓库已经支持直接使用 `mdBook` 构建网页书籍。
仓库已经支持直接使用 `mdBook` 构建网页书籍,同时支持生成 PDF 和 EPUB
安装:
```bash
cargo install mdbook --locked
cargo install mdbook mdbook-pdf mdbook-epub --locked
```
构建:
@@ -47,7 +47,12 @@ mdbook build
mdbook serve --open
```
生成结果位于 `book/` 目录。仓库同时提供了 GitHub Actions 工作流,在 `master` 分支更新后自动构建并部署 GitHub Pages。
生成结果位于 `book/` 目录
- HTML`book/html/`
- PDF`book/pdf/output.pdf`
- EPUB`book/epub/Linux 内核揭秘.epub`
仓库同时提供了 GitHub Actions 工作流,在 `master` 分支更新后自动构建并部署 GitHub Pages。
## 邮件列表

View File

@@ -8,3 +8,9 @@ default-theme = "light"
preferred-dark-theme = "navy"
git-repository-url = "https://github.com/hust-open-atom-club/linux-insides-zh"
site-url = "/linux-insides-zh/"
[output.pdf]
cover-image = "cover.jpg"
[output.epub]
cover-image = "cover.jpg"