thewondertwins / learngo

Community sourced book for experienced developers coming to Go
MIT License
41 stars 18 forks source link

output formats #5

Open bketelsen opened 6 years ago

bketelsen commented 6 years ago

investigate how to output formats other than HTML. I'm pretty sure gitbook supports this. If so, generate them using the same hooks we're using for deployment and link to them for download.

ghost commented 6 years ago

If you mean PDF/Mobi and epub you need to enable it in your book settings:

gitbook-format after this you get an download dropdown button: gitbook-download

bketelsen commented 6 years ago

yes, but we're not deployed on gitbook.com, we're self-hosting.

bketelsen commented 6 years ago

gitbook {pdf,mobi,epub} does the trick. they are output to the current folder. It would be nice to modify the language landing page to offer links to each + HTML version as a choice.

ghost commented 6 years ago

The only way would be to do make an folder for them write an nodejs build script for this and then link the output files directly to the landing page.

There seems to be an GitBook plugin for this:

download-pdf-link

I started with GitBook also recently and a great example for an landing page and also Leanpub compatible format is: https://github.com/thewhitetulip/web-dev-golang-anti-textbook

I hope this helps.

ghost commented 6 years ago

Just a heads up you should take a look at GitBook-beta there are changes coming for multilang support and landing page modifications in the next release.