Skip to content

opensourcedoc/asciidoc-ebook-cjk-boilerplate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AsciiDoc eBook Boilerplate for CJK

Synopsis

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.

System Requirements

Usage

Windows

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-ebook

Migrate the project:

> migrate.bat

Several files are generated. Keep the template files as is.

Modify parameters.yml as needed. Then migrate the ebook parameters into the project:

> ruby migrate.rb

To compile an EPUB ebook:

> epub.bat

To compile a MOBI ebook:

> mobi.bat

An intermediate EPUB file will be generated as well.

To compile a PDF ebook:

> pdf.bat

To compile a PDF ebook for print:

> print.bat

Clean all generated ebooks:

> clean.bat

Unix

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-ebook

Migrate the project:

$ ./migrate

Several files are generated. Keep the template files as is.

Modify parameters.yml as needed. Then migrate the ebook parameters into the project:

$ ruby migrate.rb

To compile an EPUB ebook:

$ ./epub

To compile a MOBI ebook:

$ ./mobi

An intermediate EPUB file will be generated as well.

To compile a PDF ebook:

$ ./pdf

To compile a PDF ebook for print:

$ ./print

Clean all generated ebooks:

$ ./clean

eBooks with Mixed Chinese and English Text

Sarasa 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.yml

Sarasa 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.

Note

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.

The boilerplate project itself is licensed under MIT.

You may license ebooks generated with this boilerplate under any license you prefer.

About

AsciiDoc eBook Boilerplate for CJK

Topics

Resources

License

Stars

Watchers

Forks

Contributors