I made this respository in order to facilitate publishing to both GitBook and LeanPub, free services that enable you to use version-control (e.g., git) while writing. There are two sets of files contained within this repository to support both GitBook and LeanPub.
Traditionally, this is the place where you should put your book summary. Instead, I'm going to tell you how to set up syncing to both places.
- Get an account at GitBook and link your GitHub account to your GitBook account.
- Establish this cloned (or forked) repository and push to GitHub under the name that you want.
- Create a new GitBook book, and select "GitHub" from the options at the top.
- Select your existing repository from the dropdown menu, add a description, and create your book.
- To add new files, you need to update SUMMARY.md. Refer to GitBook documentation for more details on SUMMARY.md creation and updating.
- To add a cover, you'll replace the provided
cover.jpg
in the root directory.
- Get an account at LeanPub and create a new book.
- Select the GitHub option and add your username/repository name.
- On GitHub, add "leanpub" as a collaborator under the repository settings.
- To add new files, you need to edit "manuscript/Book.txt".
- To add a cover, you'll replace "images/title_page.jpg" with your file.
- You need to write files with the .md extension for them to work for both platforms.
- Be sure to update both TOC files (SUMMARY.md and manuscript/Book.txt) to make sure that both reflect new changes
- There are additional steps to take with Leanpub and GitBook, e.g., setting front matter and selling pages.
- You can add "Leanpub" as a service to your repository to have it automatically generate a preview.