Preprocessors


Bookiza comes in multiple flavors.

Write your book using Markdown, Haml (recommended), Pug, Sass, Less, Stylus or simply plain HTML, CSS and JavaScript. You can choose different combinations for different books and also vary the preprocessing pipeline at component or page-level.

Configuring Preprocessors:

There are two ways to choose preprocessing (or none) for your Superbooks:

  1. Globally, using ArcBookiza mode i.e. property on .bookizarc object called mode, or
  2. Locally, per Superbook, using the .bookrc mode object.

Using the .bookrc mode.

Default configuration of Bookiza is set on building blocks of web i.e. plain HTML, CSS and JavaScript. This can be changed on your Superbook by altering the mode property on .bookrc file at the root of your project. Note, the output i.e. build off Bookiza is always going to be HTML, CSS and JavaScript no matter what preprocessor setting, logic or transformation you may have applied via the .bookrc or ArcBookiza.

Here is a sample mode object .bookrc on our Superbook for Bookiza Documentation that uses haml and scss instead of plain html and css.

{
  "mode": {
    "HTML": "haml",
    "CSS": "scss",
    "JS": "js",
    "HEAD": "html"
  },
  "name": "Bookiza Documentation",
  "type": "text",
  "book_id": 167
}

Configuring bookiza will set its generators and renderers to use the appropriate templating engine (or preprocessor) for its pages and templates.