Original sync to: http://www.waylau.com/using-github-markdown-gitbook-write-open-source-books/
has been writing open source books on GitHub (see: http://www.waylau.com/books/) However, since GitHub's own directory structure does not necessarily conform to the habit of reading, and does not provide PDF, EPUB, MOBI and other formats for the conversion download. Many students are also accustomed to reading documents offline. Gitbook is a solution to this problem.
Gitbook allows you to maintain the writing habits of Github, a little configuration, you can automatically publish to the Gitbook, forming a beautiful interface of the ebook (support HTML, PDF, EPUB, MOBI, etc.).
If you are using Gitbook for the first time, see Using Gitbook to write open source books
Here's what to do if you transfer a Github project to Gitbook.
Registered Account
Need to have a Github and Gitbook account
Affiliate Account
Associating a Gitbook project with a Github library
Original project
This is the original project structure, see https://github.com/waylau/apache-shiro-1.2.x-reference.
Add summary.md file Configuration
Do not change the original project structure, add summary.md file, describes the Gitbook directory structure, as follows:
# Summarythis is the summary of my book.* I. Overview Overview * [1. Introduction Introduction] (I. Overview overview/1. Introduction Introduction. MD) * [2. Tutorial Tutorial] (I. Overview overview/2. Tutorial Tutorial. md) * [3. Architecture Architecture] (I. Overview overview/3. Architecture architecture. MD) * [4. Configuration configurations] (I. Overview Overview/4. Configuration. md) * Ii. Core Cores * [5. Authentication certification] (II. Core/5. Authentication certified. MD) * [6. Authorization Authorization] (II. CORE/6. Authorization authorized. MD) * III. Web applications* IV. Auxiliary Support assistance * V. Integration integration * VI. Tools Tool * VII. Index directory * VIII. Other
Compile
$ gitbook Build./
After compilation succeeds, build _book
directory
Run
_book
in the running directoryindex.html
Effect
Submit updates to Github and automatically publish to Gitbook
Submit the code to the GitHub library, because the Gitbook project is associated with a GitHub library, so Gitbook is automatically released on GitHub.
The effect is as follows:
E-Book Online: http://waylau.gitbooks.io/apache-shiro-1-2-x-reference/
Write open source books with Github, Markdown and Gitbook