A minimal yet powerful boilerplate for generating clean, multi-format eBooks (EPUB, MOBI, PDF, print) using the AsciiDoctor toolchain — with full support for Chinese, Japanese, and Korean (CJK) text.
This project provides:
-
Clean separation of content and layout
-
Automatic project scaffolding and theming
-
Unicode-friendly font presets for East Asian mixed-language typesetting
-
Support for EPUB, MOBI, and PDF output with a unified build process
Whether you’re writing technical guides, translated texts, or bilingual books, this boilerplate helps you get started quickly — without having to assemble the toolchain yourself.
Clone the project locally and change your working directory accordingly:
> git clone https://github.com/opensourcedoc/asciidoc-ebook-cjk-boilerplate.git my-ebook
> cd my-ebookMigrate the project:
> migrate.batSeveral files are generated. Keep the template files as is.
Modify parameters.yml as needed. Then migrate the ebook parameters into the project:
> ruby migrate.rbTo compile an EPUB ebook:
> epub.batTo compile a MOBI ebook:
> mobi.batAn intermediate EPUB file will be generated as well.
To compile a PDF ebook:
> pdf.batTo compile a PDF ebook for print:
> print.batClean all generated ebooks:
> clean.batClone the project locally and change your working directory accordingly:
$ git clone https://github.com/opensourcedoc/asciidoc-ebook-cjk-boilerplate.git my-ebook
$ cd my-ebookMigrate the project:
$ ./migrateSeveral files are generated. Keep the template files as is.
Modify parameters.yml as needed. Then migrate the ebook parameters into the project:
$ ruby migrate.rbTo compile an EPUB ebook:
$ ./epubTo compile a MOBI ebook:
$ ./mobiAn intermediate EPUB file will be generated as well.
To compile a PDF ebook:
$ ./pdfTo compile a PDF ebook for print:
$ ./printClean all generated ebooks:
$ ./cleanSarasa Gothic TC does not handle mixed Chinese–English text well in some ebook readers. In such cases, line wrapping may behave incorrectly.
If your ebook contains significant mixed Chinese and English text, consider using WenQuanYi Zen Hei instead.
Switch the CJK theme:
$ cp cjk-wqy-theme.yml cjk-theme.ymlSarasa generally produces more visually pleasing results, so it remains the default. Both themes are included so that you can choose the one that best suits your ebook.
You must edit epub.adoc, pdf.adoc, and print.adoc separately to generate ebooks for different output formats. This limitation is imposed by the current AsciiDoctor toolchain.