A boilerplate for self-publishing books, based on the Jekyll blog platform.
Features:
- Table of contents
- Buttons for previous and next chapter
- Also, scripts for spellchecking the book and for converting it in various formats.
If you already know how to use Jekyll, copy the boilerplate, put the chapters in the _chapters
folder, and edit the _config.yml
, check below for detailed steps.
-
Create a Github account
-
Create a new repository from the boilerplate by following the link https://github.com/boris-marinov/jekyll-book-boilerplate/generate
-
Fill out the "Repository Name" field and click "Create" - you repository should be up on "https://github.com/<your_username>/<your_book_title>".
-
Enable Github pages
- Go to the profile of your repository "https://github.com/<your_username>/<your_book_title>", and click "Settings".
- Scroll down to the "Github pages" and under the "Source" dropdown, select "main" - you book should be up on "https://<your_username>.github.io/<your_book_title>".
- Go to the
/_config.yml
file and edit thename
anddescription
fields for your book. If you are using the Github guide from above you also need to set thebaseurl
property to<your_book_title>
. - In the
/_chapters
folder, place the chapters of yout book where the file names would have to follow the chapters order, like 01, 02, 03 etc.
Read about Jekyll for more info.
- Install Pandoc.
- Edit the
/title.txt
file - Start the
convert
script. Under MacOS, it would work if you install GNU sed, instead of thesed
that comes with the OS.
There are links for downloading the epub and the txt files at the website footer
- Install
npm
and the spellchecker-cli npm package. - Start the
spellcheck
script.
You can fill any words that you want to exclude from the spellcheck in the /dictionary.txt
file.