With Github one can write a well-formatted README.md file and document to present the project. Also, there are wiki pages for user to collaborate. I'm wandering what would be an optimal workflow, even for non tech users, to make use of the GitHub platform to write a collaborative book.
How to use markdown but then enhance it by applying a stylesheet, make PDF out of it, organise chapters, have a public site (gh-pages) out of it and so on? Is there such a project or tool chain for GitHub?
In other word, how to easily write a collaborative book with a nice html and PDF output in GitHub? Thanks.
Formats, tips and techniques for using GitHub and Git as the version control and collaborative platform for writing short and long form books. GitHub and Git are not just for writing programming code. They can also be an effective tool for writing articles and books.
Git and GitHub do commits on pretty much any file type for writing, although it works best with plain text. If you write in Microsoft Word, it'll work, but you won't be able to see your past commits on the command line or in GitHub.
Visit Leanpub to create a book in GitHub, entering a Title and URL for your book: Next, select the On Your Computer option: Select Using Git and GitHub and enter the exact name you gave earlier for your new repository: Finally, choose the appropriate plan for you and continue.
Go to https://leanpub.com/create/book to create a book in GitHub writing mode: First, type a title for your book into the "TITLE" box. You can change your title later: Click in the "BOOK URL" box.
Edit: GitBook has changed significantly since I first wrote this answer. PDF support has been dropped, and the CLI toolchain has been abandoned in favour of a proprietary service:
As the efforts of the GitBook team are focused on the GitBook.com platform, the CLI is no longer under active development.
In mid-2019 mdBook is a good option, though it doesn't natively support PDF. If you have Rust and Cargo installed you can simply
cargo install mdbook
to get started.
Original answer:
This is exactly what GitBook is designed for:
GitBook is a command line tool (and Node.js library) for building beautiful books using GitHub/Git and Markdown (or AsciiDoc).
It supports PDF output out of the box, as well as online publishing on its own web platform.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With