Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using github to write a book [closed]

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.

like image 757
pistacchio Avatar asked Aug 15 '16 11:08

pistacchio


People also ask

Can you write a book on GitHub?

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.

Is GitHub good for writers?

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.

How do I publish my book on 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.

How do I create a GitHub manuscript?

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.


1 Answers

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.

like image 165
Chris Avatar answered Oct 19 '22 20:10

Chris