To create your own ebook is super simple: clone this project and start writing!
Note
|
And now you don’t need to worry about the release process because it’s fully automated! Follow all the instructions from automated-release project and config your onw project. This configuration optional. You can stay releasing manually your ebook if you want. Basically you only need to configure you GitHub Personal Access Token and enable Travis-CI. Ok! Now you are going to need Node.js installed to make sure you are respecting conventional-commits pattern. But again, the automated versioning is optional. Take a look at all the automated releases generated by those Pull Requests and the good looking release page. You only need to write good commits to have all this. 😄 The latest release (or maybe the first one o/) of this project is already automated. |
Although the project has lots of configuration, you just need to focus on the following topics:
-
Fill the file
automated-ebook.asc
with the right information. Here you will need to change the book name, author, and maybe the number of levels on the table of contents (:toclevels:
, the default is configured to 3). -
At the same file, adjust chapters file names. You can add, remove or rename. You are in charge here.
-
Last but not least, create your chapters! The first chapter has lots of tips about how to deal with Asciidoctor syntax, but you can also check the documentation to get more details.
You can also change the file cover.png
with your own book cover. The size of this image is 1050x1600. You can use canva.com to create your design. It’s FREE. But the default size there is 1410x2250, so you will need to resize and fit after downloading (not a problem).
To simplify things, let’s use Docker to automate book generation. Make sure you have it installed.
Each file from the eBook (HTML, Epub, Mobi e PDF) will be generated by using the image oficial image of Asciidoctor. Super easy!
Execute one of the following commands, according to your OS, on the project’s root folder:
# linux / unix
docker run --rm -v $(pwd):/documents/ asciidoctor/docker-asciidoctor scripts/docker-startup.sh
# others (change <path> with the full path of the current directory)
docker run --rm -v <path>:/documents/ asciidoctor/docker-asciidoctor scripts/docker-startup.sh
Or use Docker Compose command to be able to type faster and avoid all parameters (already configured on docker-compose.yml
):
docker-compose run --rm ebook
-
AsciiDoc Syntax Quick Reference → The fastest way to get tips from how to use ASC syntax.
-
AsciiDoc Writer’s Guide → Going deeper about ASC details.
-
Asciidoctor EPUB3 → Getting curious about how ASC generate book formats.
-
User Manual → OK! Here it is everything about this awesome tool!!
Send a Pull Request with your project’s URL that uses this project 😄
The project progit2 was used as a reference to create this step-by-step process to automate this ebook. The reference’s ebook is available at git-scm.com/book.