Branch: refs/heads/master
Home:
https://github.com/liuhui998/gitbook
Commit: 6d2a14b2ce1229b519fd1eb794f55e7b6827633e
https://github.com/liuhui998/gitbook/commit/6d2a14b2ce1229b519fd1eb794f55e7b6827633e
Author: Peter.Liu <
liuh...@gmail.com>
Date: 2025-12-11 (Thu, 11 Dec 2025)
Changed paths:
M CLAUDE.md
M script/html.rb
M script/merge.rb
M script/pdf1.rb
Log Message:
-----------
修复 Cloudflare Pages 构建失败问题
Fix Cloudflare Pages build failures
主要修改:
- 在 script/pdf1.rb 中添加了 PDF 生成错误处理,当 wkhtmltopdf 不可用时允许构建继续
- 在 script/merge.rb 中添加了输出目录创建检查,避免干净构建时出错
- 在 script/html.rb 中添加了 PDF 文件复制的条件检查,仅当文件存在时才复制
- 移除了 script/pdf1.rb 中的 open 命令,该命令在 CI/CD 环境中不可用
- 更新了 CLAUDE.md 文档,记录了这些修复
这些修改确保即使在没有 PDF 生成工具的受限构建环境(如 Cloudflare Pages)中,构建也能成功完成。
Key changes:
- Added error handling in script/pdf1.rb for PDF generation failures
- Added output directory creation check in script/merge.rb
- Added conditional PDF copy in script/html.rb
- Removed open command from script/pdf1.rb (not available in CI/CD)
- Updated CLAUDE.md documentation
To unsubscribe from these emails, change your notification settings at
https://github.com/liuhui998/gitbook/settings/notifications