diff options
author | Aaron O'Mullan <aaron.omullan@gmail.com> | 2014-08-11 09:42:18 -0700 |
---|---|---|
committer | Aaron O'Mullan <aaron.omullan@gmail.com> | 2014-08-11 09:42:18 -0700 |
commit | d216661f2743385ea760b9993fdd46968e37ee42 (patch) | |
tree | de00bb67ffe5728f6175beb1ee0328354aa4f624 /lib/generate/config.js | |
parent | 74f95f4d0d404e6df533d056a5acab60623407c8 (diff) | |
parent | 50dfee99b6880da4be442bd43f475ae87a565c46 (diff) | |
download | gitbook-d216661f2743385ea760b9993fdd46968e37ee42.zip gitbook-d216661f2743385ea760b9993fdd46968e37ee42.tar.gz gitbook-d216661f2743385ea760b9993fdd46968e37ee42.tar.bz2 |
Merge pull request #403 from GitbookIO/version/1.0.0
Version 1.0.0
Diffstat (limited to 'lib/generate/config.js')
-rw-r--r-- | lib/generate/config.js | 96 |
1 files changed, 96 insertions, 0 deletions
diff --git a/lib/generate/config.js b/lib/generate/config.js new file mode 100644 index 0000000..0b270a3 --- /dev/null +++ b/lib/generate/config.js @@ -0,0 +1,96 @@ +var _ = require('lodash'); +var path = require('path'); + +// Default configuration for gitbook +var CONFIG = { + // Folders to use for output + // Caution: it overrides the value from the command line + // It's not advised this option in the book.json + "output": null, + + // Generator to use for building + // Caution: it overrides the value from the command line + // It's not advised this option in the book.json + "generator": "site", + + // Configuration file to use + "configFile": "book", + + // Book title and description (defaults are extracted from the README) + "title": null, + "description": null, + + // For ebook format, the extension to use for generation (default is detected from output extension) + // "epub", "pdf", "mobi" + // Caution: it overrides the value from the command line + // It's not advised this option in the book.json + "extension": null, + + // Plugins list, can contain "-name" for removing default plugins + "plugins": [], + + // Global configuration for plugins + "pluginsConfig": { + "fontSettings": { + "theme": null, //"sepia", "night" or "white", + "family": "sans",// "serif" or "sans", + "size": 2 // 1 - 4 + } + }, + + // Set another theme with your own layout + // It's recommended to use plugins or add more options for default theme, though + // See https://github.com/GitbookIO/gitbook/issues/209 + "theme": path.resolve(__dirname, '../../theme'), + + // Links in template (null: default, false: remove, string: new value) + "links": { + // Custom links at top of sidebar + "sidebar": { + //"Custom link name": "https://customlink.com" + }, + + // Sharing links + "sharing": { + "google": null, + "facebook": null, + "twitter": null, + "weibo": null, + "all": null + } + }, + + + // Options for PDF generation + "pdf": { + // Add toc at the end of the file + "toc": true, + + // Add page numbers to the bottom of every page + "pageNumbers": false, + + // Font size for the file content + "fontSize": 12, + + // Paper size for the pdf + // Choices are [u’a0’, u’a1’, u’a2’, u’a3’, u’a4’, u’a5’, u’a6’, u’b0’, u’b1’, u’b2’, u’b3’, u’b4’, u’b5’, u’b6’, u’legal’, u’letter’] + "paperSize": "a4", + + // Margin (in pts) + // Note: 72 pts equals 1 inch + "margin": { + "right": 62, + "left": 62, + "top": 36, + "bottom": 36 + } + } +}; + +module.exports = { + CONFIG: CONFIG, + defaults: function(options) { + return _.merge(options || {}, CONFIG, _.defaults); + } +} + |