From e1538a55b689e38d50a6d2cc87f1ae0a0aeb5ebc Mon Sep 17 00:00:00 2001 From: Dylan Date: Thu, 15 Oct 2026 14:37:42 +0800 Subject: [PATCH] =?UTF-8?q?docs:=20=E4=BF=AE=E6=AD=A3=E6=9C=AC=E5=9C=B0?= =?UTF-8?q?=E7=94=B5=E5=AD=90=E7=89=88=E6=9E=84=E5=BB=BA=E5=91=BD=E4=BB=A4?= =?UTF-8?q?=E7=9A=84=E5=B7=A5=E4=BD=9C=E7=9B=AE=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 39780c691..e4dcb3c8d 100644 --- a/README.md +++ b/README.md @@ -154,10 +154,11 @@ python -m http.server 8000 然后浏览器开 `http://localhost:8000/`。检索页是纯静态的,`README.md` 和 `book/` 就是它的数据,没有后端、没有数据库、不用装依赖;把整个目录丢给任何静态服务器(Nginx、GitHub Pages、对象存储)效果一样。注意 `index.html` 必须经 http 打开,直接双击本地文件会空白——浏览器不许网页读本地文件,那种场景请用上面的离线单文件版。 -想自己生成这四样(平时用不着,Release 里的就是自动生成的): +想自己生成这四样(平时用不着,Release 里的就是自动生成的)。下面的命令都在仓库根目录(`HowToLiveBetter/`)运行: ```bash -cd tools/epub && npm ci && npm run build # EPUB +npm --prefix tools/epub ci # 安装 EPUB 依赖 +npm --prefix tools/epub run build # EPUB node tools/offline/build.mjs # 离线单文件 HTML node tools/pdf/build.mjs # PDF,另需 pandoc ≥ 3.1 和 typst ≥ 0.13 node tools/anki/build.mjs # Anki 牌组,要 Node ≥ 22.13(用自带的 node:sqlite)