Skip to content

opensourcedoc/asciidoc-ebook-cjk-boilerplate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 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 reinvent the toolchain.

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. Migrate the parameters of the ebook in the project:

> ruby migrate.rb

To compile an EPUB ebook:

> epub.bat

To compile a MOBI ebook:

> mobi.bat

An intermediate EPUB ebook is compiled as well.

To compile a PDF ebook:

> pdf.bat

To compile a PDF ebook for print:

> print.bat

Clean all 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. Migrate the parameters of the ebook in the project:

$ ruby migrate.rb

To compile an EPUB ebook:

$ ./epub

To compile a MOBI ebook:

$ ./mobi

An intermediate EPUB ebook is compiled as well.

To compile a PDF ebook:

$ ./pdf

To compile a PDF ebook for print:

$ ./print

Clean all ebooks:

$ ./clean

eBooks with Mixed Chinese and English Text

Sarasa gothic TC font doesn’t support ebooks with mixed Chinese and English text well. Ebooks with sarasa font will be rendered with incorrect line wrapping sometimes.

If you are writing an ebook with mixed Chinese and English, use WenQuanYi Zen Hei instead.

Migrate the CJK theme:

$ cp cjk-wqy-theme.yml cjk-theme.yml

Ebooks with sarasa font look better. Hence, we keep both. It is up to you to choose a font that suits your ebook.

Note

You have to edit epub.adoc, pdf.adoc and print.adoc separately to generate ebooks of different file formats, which is the limitation imposed by AsciiDoctor toolchain currently.

The boilerplate project itself is licensed under MIT.

You keep your own ebooks compiled with the boilerplate in any license you prefer.

About

AsciiDoc eBook Boilerplate for CJK

Topics

Resources

License

Stars

Watchers

Forks