You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
692 B
27 lines
692 B
6 years ago
|
var _ = require('lodash');
|
||
|
|
||
|
module.exports = {
|
||
|
book: {
|
||
|
assets: './assets',
|
||
|
js: [
|
||
|
'buttons.js'
|
||
|
]
|
||
|
},
|
||
|
hooks: {
|
||
|
// Compatibility layer for gitbook < 2.5.0
|
||
|
config: function(cfg) {
|
||
|
var sharingLink = _.get(cfg, 'links.sharing', {});
|
||
|
cfg.pluginsConfig.sharing = _.defaults(cfg.pluginsConfig.sharing || {}, {});
|
||
|
|
||
|
_.each(sharingLink, function(enabled, type) {
|
||
|
if (enabled != false) return;
|
||
|
|
||
|
if (type == 'all') cfg.pluginsConfig.sharing[type] = [];
|
||
|
else cfg.pluginsConfig.sharing[type] = false;
|
||
|
});
|
||
|
|
||
|
return cfg;
|
||
|
}
|
||
|
}
|
||
|
};
|