Configuration
You can paste your book.json
at jsonlint.com to validate the JSON syntax.
All fields are optionals or default to some extracted values.
gitbook
This option is used to detect which version of GitBook will be use to generate the book.
The format is a SEMVER condition.
title
This option defines the title of your book, by default this value is extracted from the README (first title).
On gitbook.com, this value is defined from the title entered on the platform.
description
{ "description": "This is such a great book!" }
This option defines the description of your book, by default this value is extracted from the README (first paragraph).
isbn
{ "isbn": "978-3-16-148410-0" }
This option defines the ISBN associated with your book
language
This option defines the language of your book, by default value is en
.
This option is used for internationalization and localization, it changes the text from the website.
On gitbook.com, this value is defined from the language detected in the content or specified in the settings.
direction
{ "direction": "rtl" }
This option is used to override the text direction from the language.
It is recommended to set the language
field to a language with the correct text direction instead.
styles
This option is used to add custom css to your book.
{
"styles": {
"website": "styles/website.css",
"ebook": "styles/ebook.css",
"pdf": "styles/pdf.css",
"epub": "styles/epub.css"
}
}
plugins
{ "plugins": ["mathjax"] }
The list of plugins being used by a book is defined in the book.json
configuration.
pluginsConfig
This option contains all plugins specific configurations.
structure
This option is used to override files paths used by GitBook.
For example if you want to use INTRO.md
instead of README.md
:
"structure": {
"readme": "INTRO.md"
}
}
Structure types are , langs
, summary
and glossary
.
variables
{
"variables": {
"myTest": "Hello World"
}
}
This option defines the variables values being used in .
{
"pdf": {
"headerTemplate": "Header of the PDF with _TITLE_",
"footerTemplate": "Footer HTML template. Available variables: _PAGENUM_, _TITLE_, _AUTHOR_ and _SECTION_."
}