Last active
July 11, 2024 03:24
-
-
Save lesterlo/d58a09a7a1790741435f574bcd8f45be to your computer and use it in GitHub Desktop.
Build a gitbook from source to PDF
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://stackoverflow.com/questions/58498643/no-result-or-error-when-using-gitbook-pdf | |
# Must use calibre-3.48.0, https://download.calibre-ebook.com/3.48.0/ | |
# Otherwise, no photo will be generated | |
$ ln -s /Applications/calibre.app/Contents/MacOS/ebook-convert /opt/homebrew/bin/ebook-convert | |
$ npm install @gitbook-ng/gitbook | |
$ npx gitbook pdf ./ ./mybook.pdf | |
# Error: Couldn't locate plugins "yahei, code, katex, splitter, github-buttons, disqus, search-plus, sharing-plus, expandable-chapters-small, image-captions, anchor-navigation-ex-toc, hints, custom-favicon", Run 'gitbook install' to install plugins from registry. | |
$ npx gitbook install | |
$ npx gitbook pdf ./ ./mybook.pdf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment