Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "clib/args"

The JSON Collection Configuration file is defined as follows:

{
   "title"    : "Title of the collection",
   "name"     : "Used as the base file name of the final document",
   "comment"  : "Comment on the collection configuration",
   "chapters" : [{
       "url"    : "URL of the first chapter"
       "respec" : "whether the document must be pre-processed by ReSpec [boolean]",
       "config" : {
           "publishDate     : "[iso date format]",
           "specStatus      : "...",
           "addSectionLinks : "[boolean]",
           "maxTocLevel     : "[number]"
       }
   },{
       ...
   }]
}

For the meaning of the configuration options, see the ReSpec manual. The "title", "name", "chapters", and "url" fields are required, all others are optional. The value of "comment" is ignored by the module.

The JSON collection configuration file is checked against the JSON schema in the get_book_configuration function.

See also some example collection configurations files.

Index

Functions

get_book_configuration

  • Validates the input JSON configuration using the JSON schema, and converts the result to the internal data structure.

    throws

    invalid schema, or schema validation error on the data

    Parameters

    • data: any

    Returns CollectionConfiguration