Skip to content

Instantly share code, notes, and snippets.

@xf-
Last active February 23, 2019 03:35
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xf-/2b759814a9aef1c9c88d9574b10b8493 to your computer and use it in GitHub Desktop.
Save xf-/2b759814a9aef1c9c88d9574b10b8493 to your computer and use it in GitHub Desktop.
Build gitbook indluding ebooks (pdf,epub, mobi) with calibre on netlify - single-line
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/build/calibre/lib/;PATH=$PATH:/opt/build/calibre/bin;wget -nv -O- https://github.com/kovidgoyal/calibre/raw/master/setup/linux-installer.py | python -c "import sys; main=lambda x:sys.stderr.write('Download failed\n'); exec(sys.stdin.read()); main('/opt/build')";yarn global add svgexport;gitbook install; gitbook build;gitbook pdf ./ ./_book/book.pdf;gitbook mobi ./ ./_book/book.mobi;gitbook epub ./ ./_book/book.epub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment