Skip to content

Commit

Permalink
feat: 支持 MOBI 版 (#21)
Browse files Browse the repository at this point in the history
使用 Calibre 的 ebook-convert 命令将 EPUB 转换为 MOBI 以实现支持。
  • Loading branch information
Zh40Le1ZOOB committed Jun 16, 2024
1 parent 292a9e0 commit 5fb64e9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,12 @@ jobs:
curl -sL -o times_sans_serif.zip https://dl.dafont.com/dl/?f=times_sans_serif
unzip times_sans_serif.zip -d ~/.local/share/fonts/times_sans_serif
fc-cache -rv
- name: Install Calibre
run: |
sudo apt install -y libegl1 libopengl0 libxcb-cursor0
sudo -v && wget -nv -O- https://download.calibre-ebook.com/linux-installer.sh | sudo sh /dev/stdin
- name: Build
run: |
sed -e "s/BUILD_TIME/$(TZ=Asia/Shanghai date -Isecond)/" -e "s/COMMIT_SHA/${{ github.sha }}/" -i src/about.md
npm run build
ebook-convert .vitepress/dist/药娘的天空.epub .vitepress/dist/药娘的天空.mobi
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
"docs:dev": "vitepress dev",
"docs:build": "vitepress build",
"docs:preview": "vitepress preview",
"build": "npm run docs:build && find src/ -type f -name \"*.md\" ! -path \"src/index.md\" -exec sed -i \"/^---$/,/^---$/d\" {} \\; && mdbook build && cp book/epub/*.epub .vitepress/dist/ && cp book/typst-pdf/*.pdf .vitepress/dist/"
"build": "npm run docs:build && find src/ -type f -name \"*.md\" ! -path \"src/index.md\" -exec sed -i \"/^---$/,/^---$/d\" {} \\; && mdbook build && cp book/epub/药娘的天空.epub .vitepress/dist/ && cp book/typst-pdf/药娘的天空.pdf .vitepress/dist/"
}
}

0 comments on commit 5fb64e9

Please sign in to comment.